Lamech was the son of Methuselah. Methuselah was the son of Enoch. Enoch was the son of Jared. Jared was the son of Mahalaleel. Mahalaleel was the son of Cainan.