import java.util.*

fun main(args: Array<String>) {

   val scanner: Scanner = Scanner(System.`in`)
    val array: Array<Int> = arrayOf(1,2,3)
    val i1 = scanner.nextInt()
    val i2 = scanner.nextInt()
    array.forEach { e -> if (i1 != e && i2 != e ){
    print(e)}
    }
}