n = gets.to_i a = gets.split(" ").map(&:to_i) if n == 1 puts "101" return end count = 0 sum = a.sum (0..100).each do |i| count += 1 if (sum + i) % n == 0 end puts count