def main(): n=int(input()) if n!=1: a=list(map(int,input().split())) total=sum(a) else: total=0 cnt=0 # nで割ったあまりが0ならok for i in range(0,101): if (total+i)%n==0: cnt+=1 print(cnt) if __name__ == "__main__": main()