#include <iostream> using namespace std; int main() { while(true) { int n=0; cin>>n; for (int i=sizeof(int)*8-1;i>=0;i--) { int mask=1<<i;//二进制掩码 if (mask & n) cout<<"1"; else cout<<"0"; } cout<<endl; } }