import java.io.*; import java.util.*; public class Main_yukicoder605 { private static Scanner sc; private static Printer pr; private static void solve() { int n = 1_000_000; double a = sc.nextDouble(); double b = sc.nextDouble(); if (a > b) { double tmp = a; a = b; b = tmp; } double ans = 0; double pre = Math.sqrt(1 - a * a); double d = (b - a) / n; for (int i = 1; i <= n; i++) { double tmp = a + (b - a) * i / n; tmp = Math.sqrt(1 - tmp * tmp); ans += (pre + tmp) / 2 * Math.sqrt(d * d + (tmp - pre) * (tmp - pre)); pre = tmp; } pr.printf("%.7f\n", ans * 2 * Math.PI); } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(System.in); pr = new Printer(System.out); solve(); pr.close(); sc.close(); } private static class Printer extends PrintWriter { Printer(PrintStream out) { super(out); } } }