#No.1406 Test N = int(input()) A = list(map(int, input().split())) Asum = sum(A) ans = 0 for i in range(101): if (Asum + i) % N == 0: ans += 1 print(ans)