convert python to c++ online
from collections import Counter
n = int(input())
x = [int(n) for n in input().split()]
summ = sum(x)/n
def getSums(myList,target):
already_seen = Counter()
pairs = []
temp = 0
k = 0
while k < len(myList):
for _ in range(already_seen[target - myList[k]]):
temp+=1
already_seen[myList[k]] += 1
k+=1
return temp
print(getSums(x, summ*2))