#Python 3.8
N = int(input("N "))
arr = []
for i in range(N):
j = int(input())
arr.append(j)
K = int(input("K "))
sred = (sum(arr) - arr[K])/(len(arr) - 1)
print("Средне арифметическое ", sred)
#Python 3.8
N = int(input("N "))
arr = []
for i in range(N):
j = int(input())
arr.append(j)
K = int(input("K "))
sred = (sum(arr) - arr[K])/(len(arr) - 1)
print("Средне арифметическое ", sred)