// Arup Guha
// 1/23/2026
// Solution to Kattis Problem: Grazed Grains
// For both COP 4516 and COP 3330 (for this class to illustrate use of Math class)
// https://open.kattis.com/problems/grazedgrains

import java.util.*;

public class grazedgrains {

	final public static int NUMTRIALS = 100000;
	
	final public static int MIN = -10;
	final public static int RANGE = 30;
	final public static double AREA = RANGE*RANGE;

	public static void main(String[] args) {
	
		// Read in number of UFOs.
		Scanner stdin = new Scanner(System.in);
		int numUFOs = stdin.nextInt();
		
		// Create array to store circles.
		int[][] circles = new int[numUFOs][3];
		for (int i=0; i<numUFOs; i++)
			for (int j=0; j<3; j++)
				circles[i][j] = stdin.nextInt();
				
		int success = 0;
		for (int i=0; i<NUMTRIALS; i++) {
		
			// Random point.
			double x = MIN + RANGE*Math.random();
			double y = MIN + RANGE*Math.random();
			
			// Initially we have no proof it's in a circle.
			boolean inCircle = false;
			
			// See if this point is in UFO number j.
			for (int j=0; j<numUFOs; j++) {
			
				// Get distance from my random point to the center of this circle.
				double distFromCenter = Math.pow(circles[j][0]-x,2) + Math.pow(circles[j][1]-y,2);
				distFromCenter = Math.sqrt(distFromCenter);
				
				// We hit the circle!
				if (distFromCenter <= circles[j][2]) {
					inCircle = true;
					break;
				}
			}
			
			// Update success.
			if (inCircle) success++;
		}
		
		// Here is my estimate.
		System.out.println(1.0*success/NUMTRIALS*AREA);
	}
}