[<AutoOpen>]
module Program

open System

let read f = stdin.ReadLine() |> f
let reads f = stdin.ReadLine().Split() |> Array.map f

[<EntryPoint>]
let main _ =
    let A = read int
    let B = read int
    List.filter (fun x -> x <> A && x <> B) [1..3]
    |> List.head
    |> printfn "%i"
    0