open System type Sol() = member this.Solve() = let [|N;K|] = stdin.ReadLine().Split() |> Array.map int let f n k = match (n,k) with | (_,1) -> (1 <<< (n-1) ) - n | (_,_) -> (1 <<< (n-k) ) f N K |> printfn "%d" let mySol = new Sol() mySol.Solve()