SPOJ DIEHARD WA

I have tried solving the problem with normal recursion + memoization method but it is giving wrong answer on submission. Kindly help me by pointing out where I am going wrong. I know there are some optimisations pointed on some platforms. But I am not able to understand where my solution is going wrong.

For air you have increased armor by 3 instead of 2.

Thanks a lot for pointing out my silly mistake.