N,*A=map(int,open(0).read().split());print(sum(1for i in range(101)if(sum(A)+i)%N==0))