Pharaoh had a dream of seven fat cows being eaten by seven thin cows, and another of seven full ears of grain being swallowed by seven thin ears, which Joseph interpreted as seven coming years of plenty followed by seven years of famine. Joseph advised Pharaoh to appoint overseers to collect and store 20% of the harvest during plenty to provide food for the coming famine. Pharaoh recognized Joseph's wisdom and put him in charge of preparing for the famine.