#include <bits/stdc++.h>
using namespace std;



int main(){
	long long n;
	cin >> n;
	bitset<32> a(n);
	cout << a << endl;
	a.flip();
	cout << a << endl;
	a.flip();
	cout << (a<<1) << endl;
	cout << (a>>1) << endl;
}
