Doubt in 1 test case

1 test case not passing but it is giving correct output!

4
7 4 0 9

for this input your code output is 10
but correct is 19

i hope you understand
now try again and also consider this testcase
if you have any doubt feel free to ask