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