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