N = int(input()) X = list(map(int, input().split())) M = int(input()) Ans = 0 A = sum(X) / N X2 = [(i-A)**2 for i in X] A2 = (sum(X2) / N)**0.5 if A2 == 0: Ans = 50 else: A3 = (abs(A-X[M-1])*10) / A2 Ans = 50 + [-A3, A3][X[M-1] > A] print(int(Ans))