program test
implicit none
integer(8) :: i,j,k,m,n,nn,ans(1000)=0,ii
character :: ans2(1000)

read(*,*) n
nn = n
i = 1
ii = 1

do
if(nn == 0) then
	goto 100
else
	if(mod(nn,-2*ii) == 0) then
		continue
	else
		ans(i) = 1
		nn = nn - ii
	endif
endif
i=i+1
ii = ii * (-2)
enddo

100 continue
if(n == 0) then
write(*,*) 0
else

write(*,'(1000(I0))') ans(i-1:1:-1)



endif


end program