#yuki1134 from math import * n=int(input()) l=list(map(int,input().split())) m=int(input())-1 s=sum(l)/n a=[(s-l[i])**2 for i in range(n)] x=sqrt(sum(a)/n) if x>0: print(int((l[m]-s)*10/x+50)) else: print(50)