#include #include #include #include #include using namespace std; int main() { int x; long long sum = 0,cnt=0; cin >> x; queue > que; que.push(make_pair(1,1)); while (que.size()!=0) { long long a, b; pair pr; pr = que.front(); que.pop(); if (pr.second == x) { sum += pr.first; cnt++; } a = pr.first * 2; b = pr.first * 2 + 1; if (a < INT32_MAX) que.push(make_pair(a, pr.second)); if (b < INT32_MAX && pr.second < x)que.push(make_pair(b, pr.second + 1)); } cout << cnt << " " << sum << endl; return 0; }