#!/usr/bin/env python



n = int(eval(input()))



if n == 0:

    print((0))

    exit()



ans = ''

while abs(n) > 0:

    r = n%2 

    ans += str(r) 

    n //= 2

    n = -n



if abs(n)%2 == 1:

    print(ans)

else:

    print((ans[::-1]))

#!/usr/bin/env python



n = int(eval(input()))



if n == 0:

    print((0))

    exit()



ans = ''

while abs(n) > 0:

    r = n%2 

    ans = str(r) + ans 

    

    if r == 1:

        n -= 1

    n //= (-2)



print(ans)

#!/usr/bin/env python
n = int(eval(input()))
if n == 0:
    print((0))
    exit()
ans = ""
while abs(n) > 0:
    r = n % 2
    ans += str(r)
    n //= 2
    n = -n
if abs(n) % 2 == 1:
    print(ans)
else:
    print((ans[::-1]))

#!/usr/bin/env python
n = int(eval(input()))
if n == 0:
    print((0))
    exit()
ans = ""
while abs(n) > 0:
    r = n % 2
    ans = str(r) + ans
    if r == 1:
        n -= 1
    n //= -2
print(ans)

-    ans += str(r) -    n //= 2 -    n = -n -if abs(n) % 2 == 1: -    print(ans) -else: -    print((ans[::-1])) +    ans = str(r) + ans +    if r == 1: +        n -= 1 +    n //= -2 +print(ans)