#include #include #include #include #include #include #include #include #include using namespace std; string tos(int a) { string res = ""; if (a == 0) { res = '0'; } while (a > 0) { res = char((a % 10) + '0') + res; a /= 10; } return res; } int n, a, b; double calcY(double x) { return sqrt(a*b - (4 * a*b*(x - ((double)(a + b) / 2))*(x - ((double)(a + b) / 2)) / ((a + b)*(a + b)))); } double calcR(double x,double y) { return sqrt((x - a)*(x - a) + y*y) - a; } double dst(double x1, double y1, double x2, double y2) { return sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2)); } int main() { cin >> n >> a >> b; //cout << setprecision(15) << 4 * a*b*(b - a) / (double)((((double)n*n - 2 * n)* (b - a)*(b - a)) + (a + b)*(a + b)) << endl; double u; double d; double m; double x; double y; double t; double r; if(n % 2 == 0){ u = a + b; d = 2 * a; while(u - d > 1e-9) { m = (u + d) * 0.5; t = calcY(m); if (t > calcR(m, t)) { d = m; } else { u = m; } } x = (u + d)*0.5; y = calcY(x); } else { x = a + b; y = 0; } n = (n - 1) / 2; r = calcR(x, y); while (n--) { u = x; d = 0; while (u - d > 1e-9) { m = (u + d) * 0.5; t = calcY(m); if (dst(m, t, x, y) > r + calcR(m, t)) { d = m; } else { u = m; } } x = (u + d)*0.5; y = calcY(x); r = calcR(x, y); } cout << r << endl; return 0; }