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