Eclipse#1423

Eclipse

1 second
64 megabytes
Easy

People have always been fascinated by solar eclipses. These occur when the Moon covers the Sun or part of it, casting its shadow on Earth. For some aliens living in a faraway galaxy, eclipses are more complex. They have multiple moons of different sizes (all are perfectly round), making it difficult to calculate how much of their Sun is covered by the moons, even if the positions of their moons are known. As a gesture of interplanetary friendship, help them by writing a program that calculates the percentage of the Sun's area covered by the moons in a simplified flat model.

Input

The first line contains three integers x_0, y_0, r_0 — the coordinates of the center and the radius of the Sun in the flat model.

The second line contains a single natural number — the number of moons, where 1 \leq N \leq 10.

The following lines each contain three integers x_i, y_i, r_i — the coordinates of the centers and the radii of the moons in the flat model.

All center coordinates are from to (inclusive), and the radii are from to (inclusive).

Output

Output a single integer — the percentage of the Sun's area covered by the moons (rounded to the nearest integer according to standard rounding rules).

Examples

Example 1

Loading
Loading