Verse 18

And Noah was five hundred and two years old when Naamah bare Shem, and the boys grew up and went in the ways of the Lord, in all that Methuselah and Noah their father taught them.