import math N = int(input()) X = list(map(int, input().split())) M = int(input()) a = sum(X)/N v = [] for x in X: v.append((x-a)**2) u = math.sqrt(sum(v)/N) if u==0: print(50) exit() t = abs(X[M-1]-a)*10/u if X[M-1]>=a: print(int(50+t)) else: print(int(50-t))