a=gets.to_i if a==1 then b=0 else b=gets.split(" ").map{|e| e.to_i}.sum end ans=0 0.upto(100){|i| ans+=1 if (b+i)%a==0 } puts ans