#include <bits/stdc++.h>
#define trans 2//输入十进制数,输出二进制数,可修改为十进制转换为其他任意十进制之内的数
using namespace std;
/*栈实现进制转换,此处是十进制转二进制*/
int main(){
int input = 0;
stack<int> house;
while(cin >> input){
if(input == 0)
cout << '0';
while(input){
house.push(input % trans);
input /= trans;
}
while(!house.empty()){
cout << house.top();
house.pop();
}
cout << endl;
}
system("pause");
return 0;
}