My code shows runtime error in 4th testcase

I am not able to find my mistake because maybe i am not sure about when does a runtime error occurs . could you please help me identify my mistake?

hi vijit
check your code for the following input
5
1 3 5 7 9
it is giving runtime error