(*
ocamlfind ocamlopt -package batteries -linkpkg main.ml -o a.out
*)
open Batteries

let () =
        Scanf.sscanf (read_line ()) "%f" (
                fun n -> 
                        List.range 0 `To 7
                      |> List.map float_of_int
                      |> List.map (fun elmnt ->
                              2.0 ** elmnt
                      )
                    |> List.filter (fun elmnt ->
                            elmnt <= n
                    )
                  |> List.max
                |>  int_of_float
        ) |> Printf.printf "%d\n"
