program main
	implicit none
	integer(8) :: a, b, as(32), bs(32), ans(32)
    integer(16) :: answer
    integer :: i, j, tmp, judge, keta
	read(*,*) a, b
	as = 0; bs = 0
    i = 0
	do while (a.gt.0)
		i = i + 1
		as(i) = mod(a,2)
		a = int(a/2)
	enddo
    i = 0
	do while (b.gt.0)
		i = i + 1
		bs(i) = mod(b,2)
		b = int(b/2)
	enddo
    do i = 1, 32
    	ans(i) = ieor(as(i), bs(i))
    enddo
    judge = 0
    keta = 32
    do while (judge.eq.0)
    	judge = ans(keta)
        keta = keta - 1
    enddo
    answer = 0
    do i = 1, keta+1
    	answer = answer + ans(i)*2**(i-1)
    enddo
    write(*,'(i0)') answer
end program main