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