Question 54733
Let the no. of sheeps be x.

Then, no. of sheeps in barn = {{{x/3}}}.
No. of sheeps out in pasture = {{{x/5}}}.
No. of new-born sheeps = {{{3(x/3 - x/5)}}} = {{{2x/5}}}.
1 sheep is his daughter's pet.
Thus, total no. of sheeps = {{{x/3 + x/5 + 2x/5 + 1}}} = {{{14x/15 + 1}}}
But we already assumed that the total no. of sheeps is x.
So, {{{14x/15 + 1 = x}}}
or {{{x - 14x/15 = 1}}}
or {{{x/15 = 1}}}
or {{{ x = 15}}}

So the farmer had 15 sheeps altogether.

Check: 15 < 20. So given condition is satisfied.