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