#include<iostream>
#include <iomanip>
#include<conio.h>
using namespace std;
class Seri10Class
{
	private :
		double sum, Xpower, fact;
		int i, j;
	public :
		double x;
		Seri10Class()
		{
			sum = 0;
			Xpower = 1;
			fact = 1;
		}
		void Calculate()
		{
			for(i = 1; i <= 10; i++) //10 jomle haselezarb
			{
				for(j = 1; j <= i; j++)
				{
					Xpower *= x;
					fact *= j;
				}
				sum += Xpower / fact;
				Xpower = 1;
				fact = 1;
			}
		}
		double GetSum()
		{
			return sum;
		}
};

int main()
{
	Seri10Class A;
	cout << "x = ";
	cin >> A.x;
	A.Calculate();
	cout << "Natije ba 5 ragham aeshar = ";
	cout << fixed << setprecision(5) << setw(9) << setfill(' ') << A.GetSum();
	getch();
}

