fun main(args:Array<String>) {
    val a = readLine()!!
    val b = readLine()!!
    val ls:List<String> = listOf(a,b)
    val l:MutableList<String> = mutableListOf("1","2","3")
    for (x in ls) {
        l.remove(x)
    }
    println(l[0])
}