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 ans = [] for i in range(m): ans.append(int(((students[i] - ave) / std) * 10 + 50)) print(ans[m-1])