object Main {
  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val a = sc.nextInt
    val b = sc.nextInt

    println((a to b).reduceLeft((tmp,y) => tmp^y))
  }

}
