#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) sum = 0 for i in range(N - 1): sum += A[i] k = 0 for i in range(101): if ((sum + i) % N == 0): k += 1 print(k)