#include<iostream>
using namespace std;
int main()
{
long long int n,a,two;
while(cin>>n)
{
a=0;two=1;
while(n>=two)
{
two*=2;
a++;
}
two/=2;
for(int i=1;i<=a;i++)
{
if(n>=two)
{
n-=two;
cout<<1;
}
else
cout<<0;
two/=2;
}
cout<<endl;
}
return 0;
}