#N = input() N = int(input()) #s = input().split() #hw = [[int(i) for i in input().split()] for _ in range(N)] #N, M = map(int, input().split()) A = list(map(int, input().split())) if (N == 1): print(100) exit() sum = 0 for i in range(1, N): sum += A[i - 1] k = 0 for i in range(101): if (((sum + i) % N) == 0): k += 1 print(k)