Lonely mdic

No attempts yetTime limit2sMemory limit64 MB

Problem

mdic is a famous pop artist. Everyone knows the works he made, so this statement skips the descriptions. These days he stays away from other people while he finishes his philosophy of art. He tries something new every day, and today he draws with circles only.

The canvas is white and every circle is filled with blue. He first draws the outline of every circle in black. Then he paints the outlines blue, which erases them. In the finished drawing the blue part is exactly the union of the parts that the NN circles cover. A point on the outline of a circle belongs to the part that circle covers.

Some circles can be erased without changing the finished drawing. Call such a circle a useless circle. A circle is useless when erasing that one circle leaves the blue part exactly as it was, that is, when the part it covers lies completely inside the part that the other N1N-1 circles cover.

Erasing the circle drawn in red in the picture above leaves the finished drawing the same as before.

A drawing can contain several useless circles. mdic finished planning the drawing before he started it, and he wants to know which circles are useless so that he saves as much work as possible.

Circles can overlap, and several circles can have the same center and the same radius. Each circle is judged on its own. While you check one circle you erase only that circle and keep every other circle.

Given the NN circles mdic plans to draw, count the useless ones.

Input

The first line contains the number of circles NN (1N3001 \le N \le 300) that mdic draws on the canvas.

Each of the next NN lines contains three integers xx, yy, rr (x1000|x| \le 1000, y1000|y| \le 1000, 1r10001 \le r \le 1000) separated by spaces, the coordinates of the center and the radius of one circle.

Output

Print the number of useless circles on the first line.