n = int(input()) if n != 1: a = list(map(int, input().split())) t = sum(a) else: t = 0 ans = 0 for i in range(101): if (t + i) % n == 0: ans += 1 print(ans)