N = int(input()) if N>1: A = list(map(int, input().split())) S = sum(A) ans=0 for i in range(0,101): ans += (S+i)%N==0 print(ans)