B = gets.split.map(&:to_i) puts (1 .. 10).find{|v| !B.include?(v) }