n = int(input()) students = list(map(int, input().split())) m = int(input()) ave = sum(students) / n var = sum((student - ave) ** 2 for student in students) std = (var / n) ** 0.5 if std == 0: print(50) exti() else: print(int(((students[m - 1] - ave) / std) * 10 + 50))