#define _CRT_SECURE_NO_WARNINGS // #pragma warning(disable:4996) #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep(i,a,b) for(int i=(a);i>=(b);i--) #define pb push_back #define mp(a,b) make_pair(a,b) #define all(a) a.begin(),a.end() #define len(x) ((int)(x).size()) #define tmax(a,b,c) max((a),max((b),(c))) #define tmin(a,b,c) min((a),min((b),(c))) #define debug(x) cerr << #x << " is " << x << endl; typedef pair Pii; typedef map Mii; typedef vector Vi; typedef vector > VVi; typedef long long ll; const int inf = 2e9; const ll ll_inf = 1e17; const int mod = 1e9 + 7; const long double eps = 1e-10; ll ans = 0; ll sum = 0; int x = 0; void calc(ll s, int n, int cnt) { if (n == 32 && cnt < x) return; if (cnt == x) { //debug(s); ans++; sum += s; return; } if (32-n < x-cnt) return; ll a = pow(2,n); calc(s+a, n+1, cnt+1); calc(s, n+1, cnt); } int main() { cin >> x; calc(0, 1, 0); cout << ans << " " << sum/2 << endl; return 0; }