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