Doubt regarding a testcase of question The Wave

this is link for question
https://www.codechef.com/problems-old/WAV2

what will be output for testcase:
5 1
1 3 5 100 9
-2