Prateek loves candy problem

https://ide.codingblocks.com/s/53807

sir, it is only showing output for only 1 value, wht should be done to rectify it ?

Hi Yukti, your code is not giving correct output even for the sample test case.
For the input:
2
5
1
The output should be:
11
2
But your code just prints 11.