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