#include<bits/stdc++.h>
using namespace std;
ifstream fi("DQQT.inp");
ofstream fo("DQQT.out");
int p=0,s=0;
int gt(int x){
   if(x<=1)return 1;
   else return x*gt(x-1);
}
void ps(int x,int i){
   int t=-1;
   if(i%2!=0)t=1;
   if(i<=x){
      p=p+t*i;
      s=s+gt(i);
      ps(x,i+1);
   }
   else fo<<p<<endl<<s;
}
int main(){
   int n;
   fi>>n;
   ps(n,1);
}
