from collections import deque N=int(input()) inf=1<<30 dp=[inf]*(N+1) dp[0]=0 for i in range(1,N+1): for j in range(1,int(i**.5)+1): dp[i]=min(dp[i],dp[i-j*j]+j) lst=[[],[]] i=N while i: for j in range(1,int(i**.5)+1): if dp[i]==dp[i-j*j]+j: i-=j*j lst[j%2].append(j) ans_lst=[] lst[0].sort() lst[1].sort() for x in lst[1]: for i in range(x): ans_lst.append(i%2) p=0 queue=deque(lst[0]) while queue: if p: x=queue.pop() else: x=queue.popleft() for i in range(x): ans_lst.append((i+p)%2) p^=1 print(*ans_lst,sep="")