Getting Out of Bounds runtime error

Problem -
https://codeforces.com/contest/35/problem/A

My code-
https://codeforces.com/contest/35/submission/81170322

Why is it giving RE ?