n = gets.chomp.to_i if n == 1 puts "100" exit end a = gets.chomp.split(" ").map(&:to_i) average_sum = n * 100 ans = a.inject(:+) count = 0 0.upto(average_sum) do |i| next if i % n != 0 next if i < ans ten = i - ans next if ten > 100 count += 1 end puts count