Johnny and the Beanstalk | CodeChef

I am getting wrong answer for test case 1 (k<=6) and rest all got accepted.
can someone debug it??
https://www.codechef.com/viewsolution/31901812