#include<iostream>intmain(){int x =0;while(std::cin >> x){if(x >=0){int a[16]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
a[0]=0;int m =15;while(x){
a[m]= x %2;
x = x /2;
m--;}for(int i =0; i <16; i++){
std::cout << a[i];}
std::cout << std::endl;}else{int a[16]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
a[0]=1;
x =-x;int m =15;while(x){
a[m]= x %2;
x /=2;
m--;}for(int i =0; i <16; i++){
std::cout << a[i];}
std::cout << std::endl;}}}