#include <iostream>
using namespace std;
int sum(int n, bool o)
{
if (n == 0 && o)
return 0;
if (n == 1)
return 1;
if (o)
return sum(n - 1, 1) + n;
else
return sum(n - 1, 0) * n;
}
int main()
int n;
cin >> n;
cout << sum(n, 1) << "\n"
<< sum(n, 0);
#include <iostream>
using namespace std;
int sum(int n, bool o)
{
if (n == 0 && o)
return 0;
if (n == 1)
return 1;
if (o)
return sum(n - 1, 1) + n;
else
return sum(n - 1, 0) * n;
}
int main()
{
int n;
cin >> n;
cout << sum(n, 1) << "\n"
<< sum(n, 0);
}