import Control.Monad

main = do
    n <- read <$> getLine
    putStrLn $ if solve n == "" then "0" else solve n

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