N = int(input()) if N == 1: print(0) exit() A = list(map(int,input().split())) sumA = sum(A) ans = 0 for i in range(101): if (sumA+i)%N == 0: ans += 1 print(ans)