program xor_world
  implicit none
  integer(8) :: a, b, n, c(0:40), k, i, s
  read(*,*) a, b
  c = 0_8
  do k = 0_8, 40_8
    if (n.gt.b) exit
    do i = a, b
      if (btest(i,k)) c(k) = c(k) + 1
    end do
    c(k) = mod(c(k),2_8)
  end do
  n = 1_8
  s = 0_8
  do k = 0_8, 40_8
    s = s + n*c(k)
    n = n * 2_8
  end do
  write(*,'(i0)') s
end program xor_world