// Learn more about F# at http://fsharp.org

open System

[<EntryPoint>]
let main argv =
    let input1 = Console.ReadLine () |> Int32.Parse
    let input2 = Console.ReadLine () |> Int32.Parse
    printfn "%i" (6 - input1 - input2)
    0 // return an integer exit code
