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