b = gets.split.map(&:to_i) h = Array(1..10).zip(Array.new(10, 0)).to_h b.each { |e| h[e] += 1 } puts h.values.index(0) + 1