int n;
float x;
cout << "Enter n=";
cin >> n; cout << "Enter x=";
cin >> x;
float u = 1 + 3 * x;
float suma = u;
if (n == 0) { cout << -1 << endl; }
else if (n == 1) { cout <<1+( 3 * x) << endl; }
else {
for (int i = 2; i < n; i++) {
u *= (-x) * (2 * i + 1) / (2 * i - 1) / (2 * i - 1) / (2 * i - 2);
suma = suma + u;
}
cout << suma << endl;
}