import numpy as np def main(): _ = int(input()) x = np.array(list(map(int, input().split()))) m = int(input()) ans = np.round_(50 + 10 * (x - np.average(x)) / np.std(x)) print(ans[m - 1]) if __name__ == "__main__": main()