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