#include <iostream>
using namespace std;
int main() {
int n;
string s;
while(cin>>n){
for(int i=n;i;i>>=1){printf(i&n?"1":"0");}
printf("\n");
}