#include <bits/stdc++.h>
typedef long long ll;

using namespace std;

int main() {
	ll N;
	cin >> N;
	bool pos = true;
	if (N < 0) pos = false;

	if (N == 0) {
		cout << 0 << endl;
		return 0;
	}

	int b = 0;
	if (!pos) b = 1;
	ll x = 1;
	if (!pos) x *= -2;
	while (abs(x) < abs(N)) {
		x *= 4;
		b += 2;
	}

	ll rest = x - N;
	vector<int> v(b + 1, 0);
	v[b] = 1;

	if (pos) {
		if (N % 2 == 1) v[0] = 1;

		rest -= 1;
		int cnt = 




	cout << x << " " << b << endl;


	/*
	ll a = 1e10;

	for (int i = 1; ; i++) {
		ll x = pow(2, i);
		if (x >= a) {
			cout << x << endl;
			cout << i << endl;
			break;
		}
	}
	*/

	return 0;
}
