Not able to find error

for this problem

https://codeforces.com/problemset/problem/1294/C

i am getting wrong ans
solution at :

Approch is same as discussed in the lecture .
please comment in my code , where it is getting wrong .

Hey,i don’t think your code is considering the case that 2,4,8 is also possible,below is my code.It is accepted
https://codeforces.com/contest/1294/submission/78627308

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.