Many farmers in Byteotia will remember last summer for a long time. And this is not because of exceptionally abundant harvests, or conversely, drought and hail, but because of mysterious circles that appeared in many wheat fields. As a Byteotian expert on all unusual problems, Bytazar decided to investigate the phenomenon of the circles from a scientific perspective. To this end, he carried out meticulous inspections of the fields. He noticed that each circle was created by crushing grain in a circular area. Any two circles touch at most at one point (in particular, one circle cannot be inside another).
Bytazar suspects that these circles are messages sent by non-Byteotian beings. Unfortunately, understanding their language will be very difficult. For now, Bytazar has created a database of circle arrangements and is conducting statistical analysis on them. The more interesting data Bytazar collects, the better. He has asked you to write a program that, for a given arrangement of circles, calculates how many pairs of circles have a common point.
Input
The first line of input contains an integer $n$ ($1 \le n \le 500\,000$), representing the number of circles in the arrangement. Each of the next $n$ lines describes one circle. The $i$-th of these lines contains three integers $x_{i}$, $y_{i}$, $r_{i}$ ($-10^{9} \le x_{i}, y_{i} \le 10^{9}$, $1 \le r_{i} \le 10^{9}$). These denote that the $i$-th circle has its center at $(x_{i}, y_{i})$ and radius $r_{i}$.
Output
Your program should output the number of pairs of circles that have a common point.
Examples
Input 1
4 0 0 5 8 6 5 -6 8 5 2 14 5
Output 1
4