Pps. No wait, Gilgamesh got it from the earlier versions in the Sumerian epic of Ziusudra and the Akkadian epic of Atra-hasis.