import java.util.*

fun main(args: Array<String>){
    val sc = Scanner(System.`in`)

    val A = sc.nextInt()
    val B = sc.nextInt()

    val list = java.util.ArrayList<Int>()
    with(list){
        add(1)
        add(2)
        add(3)
        remove(A)
        remove(B)
    }

    println(list.get(0))

    sc.close()
}