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