n=int(input()) l=list(map(int,input().split())) m=int(input()) a=sum(l)/n s=sum([abs(x-a)**2/n for x in l])**.5 print(50 if l[m-1]==a else 50+int((l[m-1]-a)*10/s))