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