#include <iostream.h>
double factorial(double );
int main(){
double sum;
sum = 0;
for(int i=0;i<20;i++)
sum += factorial(i+1);
cout << sum << endl;
return 0;
}
double factorial(double a){
double result = 1;
for(int i=(int)a;i>0;i--)
result *= i;
return result;
}