CODECHEF - Farmer Feb

http://www.codechef.com/APRIL14/problems/POTATOES/