#include<stdio.h>
int main()
{
int A[10]={0};
int n;
while(scanf("%d",&n)!=EOF)
{
int i=0,T=0;
if(n==0)
printf("%d",n);
for(i=0;n>0;i++)
{
A[i]=n%2;
n/=2;
T++;
}
for(i=T-1;i>=0;i--)
printf("%d",A[i]);
printf("\n");
}
return 0;
}