from math import sqrt n = int(input()) x = list(map(int, input().split())) m = int(input()) - 1 average = sum(x) / n a = [abs(i - average) ** 2 for i in x] b = sqrt(sum(a) / n) if b == 0: print(50) exit(0) c = abs(average - x[m]) * 10 / b if x[m] > average: print(int(50 + c)) else: print(int(50 - c)) # print("average =", average) # print("b =", b) # print("c =", c)