import Data.List
import Data.Char

div' :: Int -> Int -> Int
div' a b
  | a`mod`b == 0 = a`div`b
  | otherwise    = a`div`b+1
  
mod' :: Int -> Int -> Int
mod' a b
  | a`mod`b==0 = 0
  | otherwise  = a`mod`b-b

f :: Int -> Maybe (Char, Int)
f i
  | i == 0    = Nothing
  | i == 1    = Just ('1',0)
  | otherwise = Just (chr (ord '0'+(i`mod'`(-2))), i`div'`(-2))

main :: IO ()
main = do
  n <- readLn :: IO Int
  let cs = unfoldr f n

  putStrLn $ if null cs
    then "0"
    else foldl' (\ans c -> c : ans)  "" cs