main :: IO ()
main = do
    n <- readLn
    putStrLn $ solve n

solve :: Int -> String
solve n = case solve' n of
    [] -> "0"
    _  -> solve' n

solve' :: Int -> String
solve' 0 = []
solve' n
    | odd n  = '1' : solve (-n `div` 2)
    | even n = '0' : solve (-n `div` 2)
