N = int(input()) X = list(map(int, input().split())) M = int(input()) Ans = 0 # 平均点 A = sum(X) / N # print(A) # 全員の平均点との差の平方 X2 = [] for i in X: X2 += [(i-A)**2] # print(X2) # その平均の平方根 A2 = (sum(X2) / N)**0.5 # print(A2) if A2 == 0: Ans = 50 else: A3 = (abs(A - X[M-1]) * 10) / A2 if X[M-1] > A: Ans = 50 + A3 else: Ans = 50 - A3 print(int(Ans))