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