#!/usr/bin/env ruby

K = 64

def g(n)
  b = []
  (1..K).to_a.reverse.each do |i|
    (d, m) = n.divmod(1 << i)
    b.push({:i => i, :b => 1 << i, :d => d, :m => m})
  end
  return b.reverse
end

def main(argv)
  (a, b) = gets.chomp.split(' ').map(&:to_i)
  
  v = g(a)
  u = g(b)
  
  t = [0] * K
  K.times do |i|
    x = 0
    if v[i][:m] >= (v[i][:b] / 2) then
      x = v[i][:b] - v[i][:m]
    end
    
    y = 0
    if u[i][:m] >= (u[i][:b] / 2) then
      y = u[i][:m] - (u[i][:b] / 2) + 1
    end
    
    t[i] = (x + y) % 2
  end
  t[0] = (t[0] + [u[0][:d] - v[0][:d] - 2, 0].min) % 2
  
  puts t.reverse.join('').to_i(2).to_s
end

if self.to_s == 'main' then
  main(ARGV)
end