e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Problems

Circle and segment

Circle and segment

Find out how manypoints of intersection ofthe circlearegiven bythe centercoordinates (X, Y) and radius R,and the segmentspecified bythe coordinates of itsends (X1, Y1), (X2, Y2).

Input

SevenintegersX, Y, R, X1, Y1, X2, Y2, whose moduli do notexceed1000.

Output

The numberof intersection points.

Time limit 1 second
Memory limit 64 MiB
Input example #1
0 0 5 1 1 6 6
Output example #1
1