module Main where

main :: IO ()
main = do
    n <- readLn
    let s = f n
    putStrLn $ if s == "" then "0" else s

f :: Int -> String
f 0 = ""
f n | n `mod` 2 == 0 = '0' : f (n `div` (-2))
    | otherwise      = '1' : f ((n - 1) `div` (-2))
