//* Problem  : 1066 - Garland
//* Contest  : acm.timus.ru
//* Type     : Solution
//* Date     : 2007.11.11
//* Author   : alt
//* Language : C++
//* Compiler : Microsoft Visual C++ 6.0
//* Algoritm : Binary Search + Equation solving

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>

struct eq{
	double a, x;
} h[1010];

int n;
double a, res;

double pos[1010];

void solve();
void result();


int main()
{
	scanf("%d %lf", &n, &a);
	solve();
	result();
	return 0;
}

int valid_pos(double b)
{
	int i;
	h[1].a = a; h[1].x = 0;
	h[2].a = 0; h[2].x = 1;
	for (i = 3; i <= n; i++)
	{
		h[i].a = 2 - h[i-2].a + 2 * h[i-1].a;
		h[i].x = 2 * h[i-1].x - h[i-2].x;
	}
	double H = (b - h[n].a) / h[n].x;
	pos[1] = a;
	pos[2] = H;
	for (i = 3; i <= n; i++)
		pos[i] = h[i].x * H + h[i].a;
	//
	for (i = 1; i <= n; i++)
		if (pos[i] < 0.0) return 0;
	return 1;
}

void solve()
{
	double l = 0.0, r = 1E10, m;
	const double EPS = 0.0001;
	while (fabs(l-r) > EPS)
	{
		m = (l + r) / 2.0;
		if (valid_pos(m))
			r = m;
		else 
			l = m;
	}
	res = l;
}

void result()
{
	printf("%.2lf\n", res);
}

