n,S,B=map(int,input().split()) h=list(map(int,input().split())) q=[] for v in h: if len(q)==0 or q[-1]