MARCHA2- wrong answer

Hey guys, i can’t find what is wrong in my solution for the ‘Johnny and the Beanstalk problem’. my code is in the link
http://www.codechef.com/viewsolution/1634417
cannot anybody please point out the error in my code. Thanks!