open System type Sol() = member this.Solve() = let N =stdin.ReadLine() |> int let rec f n = match n with | 0 -> 0 | _ -> 1 + f (n/2) f (N-1) |> printfn "%d" let mySol = new Sol() mySol.Solve()