#include<bits/stdc++.h>
using namespace std;
#define int long long
#define mid ((l + r) >> 1)
#define ls (now << 1)
#define rs ((now << 1) | 1)
#define mp make_pair

const int N = 10000005;
const int inf = 2e17 + 1;
double s = 1, t = 1, x;
void init()
{
	int n;
	cin >> n >> x;
	double xx = x;
	for(int i = 1; i <= n; ++ i)
		t *= i,
		s = s + (i % 2 == 0 ? -x / t : x / t),
		x *= xx;
	cout << s;
}
signed main()
{
	int T = 1;
//	cin >> T;
	while(T --)
		init();
	return 0;
}


