a, c = gets.chomp.split().map(&:to_i) puts a ^ c