One day 3 men (Ed, Eddie and Eric) decided to go fishing. They agreed that everyone takes one third of the total number N of fish caught. After fishing they went to sleep. At 3:00 AM Ed woke up. He wanted to take his 1/3 and leave but he realized that the number N of all fishes caught is not divisible by 3. So he threw one fish into the river and took his 1/3. Then at 4:00 AM Eddie woke up thinking that Ed and Eric were still asleep. He did the same thing as Ed and left. Then at 5:00 Eric was awakened by his alarm clock. Eric did the same thing as Eddie and left.
Objective: Find the smallest number N.
My problem with solution: I solved a system of equations and I realized that it has more than 1 solution (it means $N_1,N_2,...$). But I do not know how to find the smallest N.
Thanks for help