fun main(args:Array<String>){
    val ans : MutableList<Int> = mutableListOf(1,2,3)
    val a=readLine()!!.toInt()
    val b=readLine()!!.toInt()
    ans.remove(a)
    ans.remove(b)
    println(ans[0])
}