Codeforces div2

here is my code …i m not able to figure out where im going wrong.
its very easy question of div2 problem A
question link:

solution link:

You just need to apply that operation once as parity is only what we need
Editorials are out also