{-# LANGUAGE BangPatterns #-}
import Control.Monad
import Data.List
import Data.Maybe
import Data.Bits

query :: Int -> String
query 0 = "0"
query i = loop i 1 []
  where
    loop 0 !sgn_ acc = acc
    loop i sgn !acc | even i = loop (i `shiftR` 1) (-sgn) $ '0':acc
                    | otherwise = loop (i' `shiftR` 1) (-sgn) $ '1':acc
      where i' = i-sgn

main :: IO ()
main = do
  n <- read <$> getLine
  putStrLn $ query n
