import bisect

n = int(eval(input()))

ps = [0] * (1 << 16)

for i in range(1 << 16):

    temp = 0

    for j in range(16):

        if (i >> j) & 1:

                temp += (-2) ** (2 *j)

    ps[i] = temp



pattern1 = None

pattern2 = None



for i in range(1 << 16):

    temp2 = 0

    for j in range(16):

        if (i >> j) & 1:

                temp2 += (-2) ** (2 *j + 1)

    n2 = n - temp2

    pattern1 = bisect.bisect_left(ps, n2)

    if pattern1 != (1 << 16) and ps[pattern1] == n2:

        pattern2 = bin(i)[2:].zfill(16)

        pattern1 = bin(pattern1)[2:].zfill(16)

        break



ans = ""

for i in range(16):

    ans += pattern2[i]

    ans += pattern1[i]

    

true_ans = ""

flag = False

for i in range(len(ans)):

    if ans[i]=="1":

        true_ans += "1"

        flag = True

    elif flag:

        true_ans += "0"



if true_ans == "":

    true_ans = "0"

        

print(true_ans)
import bisect

n = int(eval(input()))

ps = [0] * (1 << 16)

for i in range(1 << 16):

    temp = 0

    x = 1    

    for j in range(16):

        if (i >> j) & 1:

#                temp += (-2) ** (2 *j)

            temp += x

        x *= 4

    ps[i] = temp



pattern1 = None

pattern2 = None



for i in range(1 << 16):

    temp2 = 0

    x = -2

    for j in range(16):

        if (i >> j) & 1:

#                temp2 += (-2) ** (2 *j + 1)

            temp2 += x

        x *= 4

    n2 = n - temp2

    pattern1 = bisect.bisect_left(ps, n2)

    if pattern1 != (1 << 16) and ps[pattern1] == n2:

        pattern2 = bin(i)[2:].zfill(16)

        pattern1 = bin(pattern1)[2:].zfill(16)

        break



ans = ""

for i in range(16):

    ans += pattern2[i]

    ans += pattern1[i]

    

true_ans = ""

flag = False

for i in range(len(ans)):

    if ans[i]=="1":

        true_ans += "1"

        flag = True

    elif flag:

        true_ans += "0"



if true_ans == "":

    true_ans = "0"

        

print(true_ans)
import bisect

n = int(eval(input()))
ps = [0] * (1 << 16)
for i in range(1 << 16):
    temp = 0
    for j in range(16):
        if (i >> j) & 1:
            temp += (-2) ** (2 * j)
    ps[i] = temp
pattern1 = None
pattern2 = None
for i in range(1 << 16):
    temp2 = 0
    for j in range(16):
        if (i >> j) & 1:
            temp2 += (-2) ** (2 * j + 1)
    n2 = n - temp2
    pattern1 = bisect.bisect_left(ps, n2)
    if pattern1 != (1 << 16) and ps[pattern1] == n2:
        pattern2 = bin(i)[2:].zfill(16)
        pattern1 = bin(pattern1)[2:].zfill(16)
        break
ans = ""
for i in range(16):
    ans += pattern2[i]
    ans += pattern1[i]
true_ans = ""
flag = False
for i in range(len(ans)):
    if ans[i] == "1":
        true_ans += "1"
        flag = True
    elif flag:
        true_ans += "0"
if true_ans == "":
    true_ans = "0"
print(true_ans)

import bisect

n = int(eval(input()))
ps = [0] * (1 << 16)
for i in range(1 << 16):
    temp = 0
    x = 1
    for j in range(16):
        if (i >> j) & 1:
            #                temp += (-2) ** (2 *j)
            temp += x
        x *= 4
    ps[i] = temp
pattern1 = None
pattern2 = None
for i in range(1 << 16):
    temp2 = 0
    x = -2
    for j in range(16):
        if (i >> j) & 1:
            #                temp2 += (-2) ** (2 *j + 1)
            temp2 += x
        x *= 4
    n2 = n - temp2
    pattern1 = bisect.bisect_left(ps, n2)
    if pattern1 != (1 << 16) and ps[pattern1] == n2:
        pattern2 = bin(i)[2:].zfill(16)
        pattern1 = bin(pattern1)[2:].zfill(16)
        break
ans = ""
for i in range(16):
    ans += pattern2[i]
    ans += pattern1[i]
true_ans = ""
flag = False
for i in range(len(ans)):
    if ans[i] == "1":
        true_ans += "1"
        flag = True
    elif flag:
        true_ans += "0"
if true_ans == "":
    true_ans = "0"
print(true_ans)

+    x = 1 -            temp += (-2) ** (2 * j) +            #                temp += (-2) ** (2 *j) +            temp += x +        x *= 4 +    x = -2 -            temp2 += (-2) ** (2 * j + 1) +            #                temp2 += (-2) ** (2 *j + 1) +            temp2 += x +        x *= 4