import Data.List
import Data.Array
import Data.Array.IO
import Data.Maybe
import Data.Bits
import Control.Monad
import Control.Applicative

modifyArray arr i f = readArray arr i >>= \x -> writeArray arr i (f x)

listToTuple2 (a:b:_) = (a,b)
listToTuple3 (a:b:c:_) = (a,b,c)
listToTuple4 (a:b:c:d:_) = (a,b,c,d)

main :: IO ()
main = do
  n <- readLn :: IO Int

  putStrLn $ foldl1 (++) . map show $ reverse $ minusbinary n

  where
    minusbinary 0 = [0]
    minusbinary 1 = [1]
    minusbinary n = s : (minusbinary (div (n-s) (-2)))
      where s = if odd n then 1 else 0
