Bananna Split (1)

Three friends had a crop of bananas in a warehouse to divide among themselves. They decided to wait for the next day to do the distribution. During the night, one of them thought he should get up and pick his portion. He went out, divided the crop into 3 equal parts.

There was one banana left over, which he gave to the pet monkey. He picked his part and merged the rest into one pile. Then, the second one had the same idea. Went out, divided the crop into 3 equal parts. There was one banana left over, which he gave to the pet monkey. He picked his part and merged the rest into one pile. Then, the third friend also had the same idea. Went out, divided the crop into 3 equal parts. There was one banana left over, which he gave to the pet monkey. He picked his part and merged the rest into one pile. Then next day, behaving as if nothing happened during the night, the three friends met, divided the crop into 3 equal parts. There was one banana left over, which they gave to the pet monkey. They each picked their portion.

How many bananas were there in the beginning? (Source: Dr. Longpre's rephrasing of a problem in a long lost magazine I read as a young teenager)