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