#include using namespace std; using ll = long long; #define rep(i, a, b) for(ll i = a; i < b; i++) #define Rep(i, a, b) for(ll i = a; i <= b; i++) #define repr(i, a, b) for(ll i = b-1; i >= a; i--) // #define _GLIBCXX_DEBUG template using V = vector; #define ALL(v) (v).begin(),(v).end() #define endl '\n' #define chmin(x, y) x = min(x, y) #define chmax(x, y) x = max(x, y) #define sz(v) ((ll)(v).size()) const double pi = acos(-1.0); // const ll MOD = 1000000007LL; const ll MOD = 998244353LL; const ll INF = 1LL << 60; const int dy[] = {1, 0, -1, 0}; const int dx[] = {0, 1, 0, -1}; const int dy2[] = {0, 1, 1, 1, 0, -1, -1, -1}; const int dx2[] = {1, 1, 0, -1, -1, -1, 0, 1}; // ios::sync_with_stdio(false); // cin.tie(nullptr); /*-------------------------------------------------------------------------------- --------------------------------------------------------------------------------*/ int main(){ ll n; cin >> n; bitset<25> s(n); // cerr << s << endl; ll a = n, b = 0, c = 0; rep(i, 0, 22){ if(s.test(i)){ b = 1; rep(j, 0, i) b *= 2; } } c = a^b; cout << a << " " << b << " " << c << endl; }