let N = int <| stdin.ReadLine() stdin.ReadLine() |> ignore printfn "%d" (N&&&1)