N = int(input()) s,t = map(int,input().split()) s -= 1 t -= 1 A = list(map(int,input().split())) cnt = A[s] if s