import sys, math sys.setrecursionlimit(10 ** 6) stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() nsa = lambda: list(stdin.readline().split()) mod = 10 * 7 + 7 n = ni() X = na() m = ni() ave = sum(X) / n print(ave) s2 = 0 for x in X: s2 += (abs(ave - x)) ** 2 s2 /= n s = math.sqrt(s2) print(s) ans = 50 + (X[m - 1] - ave) * 10 / s print(int(ans))