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