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