let o = 1 lsl 35
let rec pow_int a n = if n <= 0 then 1 else a * pow_int a (n-1)
let () = Scanf.scanf "%d" @@ fun n ->
  let rec loop x s i =
    if x = 0 then s
    else if (x + o) mod (1 lsl (i+1)) > 0 then
      loop (x - pow_int (-2) i) ("1" ^ s) (i+1)
    else
      loop x ("0" ^ s) (i+1)
  in
  (if n = 0 then "0" else loop n "" 0) |> print_endline