Joseph told the Egyptians to store up large amounts of food during the seven good years, and then he sold the food to the people during the seven years of famine.