My answer is submitted but still a doubt in this question

so this is my solution and it is correct
but in this if we take 0, 12, 0 as the array so the answer according to the question should be 8 as in question it is written that we can online transfer to one neighbor at a time and my solution is giving 4 so my solution should be incorrect but its passing all the test cases
I think there is something wrong or misprint in this question can you confirm and tell