/* Problem 1--Paint Bombs
   This was a straightforward problem, if you understood the Law of
   Cosines.  We compute the area of two circular "caps," the solid arc
   minus the triangular portion underneath. */

import java.io.*;
import java.util.*;
import java.text.*;

public class prob1 {

 public static Scanner in;
 public static PrintStream out;
 public static int cs;
 public static double r1, r2, d;

 public static void main (String[] args) throws Exception {

  DecimalFormat df = new DecimalFormat();
  df.setMinimumFractionDigits (2);
  df.setMaximumFractionDigits (2);
  in = new Scanner (new File ("prob1.in"));
  out = new PrintStream (new FileOutputStream ("prob1.out"));
  while (true) {
   r1 = in.nextDouble();
   r2 = in.nextDouble();
   d = in.nextDouble();
   if (r1==0 && r2==0 && d==0) break;
   out.println ("Case "+(++cs)+": Green occupies an area of "
                       +df.format(Area())+" square meters.");
  }
 }

 /* Area computes and returns the Green Area. */
 public static double Area() {

  if (r1+r2 <= d) return 0; //The two circles do not intersect at all.
  if (r2+d <= r1) return Math.PI*r2*r2;//The second is inside the first.
  if (r1+d <= r2) return Math.PI*r1*r1;//The first is inside the second.
  return Cap (r1,r2)+Cap(r2,r1); //We add two caps together.
 }

 /* Cap returns the area of the circular cap of the second circle.  The
    Law of Cosines gives us the angle.  The area of the triangle is
    1/2 r2 r2 sin Theta; we subtract that from the area of the
    "pie piece." */
 public static double Cap (double r1, double r2) {

  double Th = 2*Math.acos ((r2*r2+d*d-r1*r1)/(2*r2*d));
  return 0.5*r2*r2*(Th-Math.sin(Th));
 }
}
