#include <bitset>
#include <iostream>
using namespace std;
int main(){
    bitset<32> b;
    long long int n;
    cin>>n;
    b=n;
    cout<<b<<endl;
    b.flip();
    cout<<b<<endl;
    b.flip();
    cout<<(b<<1)<<endl;
    cout<<(b>>1)<<endl;
}
