import math



n = int(eval(input()))

if n == 0:

    print((0))

    exit()

out = ""

i = 0

while n != 0:

    if n % -2 != 0:

        out = str(- (n % -2)) + out

        # print("n:{} div:{}=(-2)^{}".format(n, (-2) ** i, i))

    else:

        out = str(- (n % -2)) + out



    # 123->100, -123->-100

    if n > 0:

        n = int(n / (-2))

    else:

        n = math.ceil(n / (-2))

    i += 1

print(out)

"""

tmp = 1

digit = 0

while tmp < n:

    tmp *= 4

    digit += 1

number = [0 for i in range(digit)]

print(number)

tmp = n

for i in range(digit):

    if 0 < tmp % 4 < 4:

        number[i] = tmp % 4

        tmp = int(tmp / 4)

"""

import math



# print("{}/{}={} %{}".format(-123, 10, -123/10, -123 %10))

n = int(eval(input()))

if n == 0:

    print((0))

    exit()

out = ""

i = 0

while n != 0:

    if n % -2 != 0:

        out = str(- (n % -2)) + out

        # print("n:{} div:{}=(-2)^{}".format(n, (-2) ** i, i))

    else:

        out = str(- (n % -2)) + out



    # 12 -> 2 + 10^1, -12 -> 8 + 2*(-10)^1

    if n > 0:

        n = int(n / (-2))

    else:

        n = math.ceil(n / (-2))

    i += 1

print(out)

import math

n = int(eval(input()))
if n == 0:
    print((0))
    exit()
out = ""
i = 0
while n != 0:
    if n % -2 != 0:
        out = str(-(n % -2)) + out
        # print("n:{} div:{}=(-2)^{}".format(n, (-2) ** i, i))
    else:
        out = str(-(n % -2)) + out
    # 123->100, -123->-100
    if n > 0:
        n = int(n / (-2))
    else:
        n = math.ceil(n / (-2))
    i += 1
print(out)
"""
tmp = 1
digit = 0
while tmp < n:
    tmp *= 4
    digit += 1
number = [0 for i in range(digit)]
print(number)
tmp = n
for i in range(digit):
    if 0 < tmp % 4 < 4:
        number[i] = tmp % 4
        tmp = int(tmp / 4)
"""

import math

# print("{}/{}={} %{}".format(-123, 10, -123/10, -123 %10))
n = int(eval(input()))
if n == 0:
    print((0))
    exit()
out = ""
i = 0
while n != 0:
    if n % -2 != 0:
        out = str(-(n % -2)) + out
        # print("n:{} div:{}=(-2)^{}".format(n, (-2) ** i, i))
    else:
        out = str(-(n % -2)) + out
    # 12 -> 2 + 10^1, -12 -> 8 + 2*(-10)^1
    if n > 0:
        n = int(n / (-2))
    else:
        n = math.ceil(n / (-2))
    i += 1
print(out)

+# print("{}/{}={} %{}".format(-123, 10, -123/10, -123 %10)) -    # 123->100, -123->-100 +    # 12 -> 2 + 10^1, -12 -> 8 + 2*(-10)^1 -""" -tmp = 1 -digit = 0 -while tmp < n: -    tmp *= 4 -    digit += 1 -number = [0 for i in range(digit)] -print(number) -tmp = n -for i in range(digit): -    if 0 < tmp % 4 < 4: -        number[i] = tmp % 4 -        tmp = int(tmp / 4) -"""