N=int(input()) x=[*map(int, input().split())] M=int(input()) a=sum(x)/N m=(sum([(b-a)**2 for b in x])/N)**0.5 print(50 if m==0 else int((x[M-1]-a)*10/m)+50)