Matthew 1:17-19

17 Thus the total number of generations from Abraham to David is fourteen generations; from David to the Babylonian exile, fourteen generations; from the Babylonian exile to the Messiah, fourteen generations. [5]

18 [6]Now this is how the birth of Jesus Christ came about. When his mother Mary was betrothed to Joseph, [7] but before they lived together, she was found with child through the holy Spirit.

19 Joseph her husband, since he was a righteous man, [8] yet unwilling to expose her to shame, decided to divorce her quietly.