#include <iostream>
using namespace std;


int main() {

	float x;
	long n;

	cout << "x = ";
	cin >> x;
	
	cout << "n = ";
	cin >> n;

	float exp = 0;
	float num = 1;
	int counter = 0;

	while(counter <= n) {
		exp += num;
		++counter;
		num *= x / counter;
	}

	cout << "e ^ " << x << " = " << exp << endl;
	
	return 0;

}
