#include "iostream" using namespace std; const long long int UP = 2147483647; //int log_num[32] = {1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,131072,262144,524288,1048576,2097152,4194304,8388608,16777216,33554432,} int N; long long int ans; int fig; void search(long long int num,int point) { if (num > UP)return ; if (num == 0) { search(1, 1); if (N == 0) { fig++; } return ; } if (point < N) { search(num * 2, point); search(num * 2 + 1, point + 1); } else if (point == N) { ans += num; fig++; search(num * 2, point); } return ; } int main() { cin >> N; search(0, 0); cout << fig << " " << ans << "\n"; return 0; }