import math
from math import log
n=int(input())
neg_bin =[]

def f(n,neg,m):
    if(n>1):
        #print(n,neg,m)
        x = 2*math.ceil(0.5*math.log(3*n+1,2))-1
        n -= (-2)**(x-1)
        neg.append('1')
        for i in range(m-x-1):
            neg.append('0')
        return(f(n,neg,x))
    elif(n<0):
        #print(n,neg,m)
        x = 2*math.ceil(0.5*log((3/2)*(-1*n)+1,2))
        n -= (-2)**(x-1)
        for i in range(m-x-1):
            neg.append('0')
        neg.append('1')
        return(f(n,neg,x))
    elif(n==1):
        #print(n,neg,m)
        for i in range(m-2):
            neg.append('0')
        neg.append('1')
        return(1)
    else:
        #print(n,neg,m)
        for i in range(m-2):
            neg.append('0')
        neg.append('0')
        return(1)

m= 2*math.ceil(0.5*math.log(3*n+1,2))-1 if n>1 else (2*math.ceil(0.5*log((3/2)*(-1*n)+1,2)) if n<0 else 1)
a=f(n,neg_bin,m)
#if len(neg_bin)>1:neg_bin.pop(-2)
print(''.join(neg_bin))
