#include <iostream>
#include<list>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<set>
#include<map>
#include<bitset>
using namespace std;

int main()
{
    long long x;
    cin>>x;
    bitset<32> b(x),c,d;
    c=d=b;
    cout<<b<<"\n";;
    cout<<(~b)<<"\n";
    cout<<(c<<1)<<"\n";
    cout<<(d>>1)<<"\n";

}



