import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double r = sc.nextDouble();
double h = sc.nextDouble();
double c = 2 * 3.1415926 * r;
double s = 3.1415926 * r * r;
double t = c * h + s * 2;
System.out.println(String.format("%.2f", t));
}
}
/**************************************************************
Problem: 1623
User: admin
Language: Java
Result: Accepted
Time:1137 ms
Memory:40332 kb
****************************************************************/