#include <cstdlib>
#include <iostream>
using namespace std;
long plus(int n)
{long sum1=1;
for(int i=1;i<(n+1);i++)
{sum1*=i;}
return sum1; }
int main(int argc, char *argv[])
{long plus(int n);
long sum=0;
int x;
cin>>x;
for (int i=1;i<(x+1);i++)
{
sum+=plus(i);
}
cout<<sum;
system("PAUSE");
return EXIT_SUCCESS;
}
#include <iostream>
using namespace std;
long plus(int n)
{long sum1=1;
for(int i=1;i<(n+1);i++)
{sum1*=i;}
return sum1; }
int main(int argc, char *argv[])
{long plus(int n);
long sum=0;
int x;
cin>>x;
for (int i=1;i<(x+1);i++)
{
sum+=plus(i);
}
cout<<sum;
system("PAUSE");
return EXIT_SUCCESS;
}