#include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "ru");
int n, k = 1;
double S = 1, s=0;
do
{
cout << "Введите n" << endl;
cin >> n;
} while (n >= 10);
for (int i = 1; i <= n; i++)
{
k *= i;
cout << "\t" << k << endl;
s += k;
}
S += 1 / s;
cout << endl << "Результат = " << S << endl;
return 0;
}