In the bottom of a well, 45 feet deep, there was a frog which commenced traveling toward the top. In his journey he ascended 3 feet every day, but fell back 2 feet every night. In how many days did he get out?
Method. He gains 1 foot a day, and in 42 days he is 3 feet from the top; and on the 43d day he reaches the top.