Piyush and magical park

why it showing wrong output

hello @lovely
pls check ur updated code here->

but the correct output is 13 .and its printing 11.

@lovely
pls check now->

this solution is in other language.

@lovely