文件目录

#include <iostream>
using namespace std;
int main()
{
    int n, s = 0, ss = 1;
    cin >> n;
    for (int i = 1; i <= n; i++)
    {
        ss *= i;
        s += ss;
    }
    cout << s;
    return 0;
}
int ans1()
{
    int n, s = 0;
    cin >> n;
    for (int j = 1; j <= n; j++)
    {
        int ss = 1;
        for (int i = 1; i <= j; i++)
        {
            ss *= i;
        }
        s += ss;
    }
    cout << s;
    return 0;
}