from decimal import Decimal, getcontext import math n = int(input()) a = list(map(Decimal, input().split())) m = int(input()) ave = sum(a) / n var = sum((x - ave) ** 2 for x in a) / n std = var.sqrt() if std == 0: dev = 50 else: student = a[m - 1] hensachi = Decimal('50') + (student - ave) * Decimal('10') / std dev = math.floor(hensachi + Decimal('1e-50')) print(dev)