#include <iostream>
using namespace std;
int main()
{
long int g = 0,n,ans=0;
cin >> n;
long int temp=0, Temp=0;
for (int j = 0; j <= n; j++)
{
g = j;
temp = Temp = g;
for (int i = 0; i < Temp - 1; i++)
{
temp = temp * (g - 1);
g -= 1;
}
ans += temp;
}
cout << ans;
return 0;
}