CF603D Ruminations on Ruminants

Description

Kevin Sun is ruminating on the origin of cows while standing at the origin of the Cartesian plane. He notices $ n $ lines ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF603D/5a13e2b3a85a983e824447071c69046417c7bab6.png) on the plane, each representable by an equation of the form $ ax+by=c $ . He also observes that no two lines are parallel and that no three lines pass through the same point. For each triple $ (i,j,k) $ such that $ 1

Input Format

The first line of the input contains a single integer $ n $ ( $ 3

Output Format

Print a single integer, the number of triples $ (i,j,k) $ with $ i<j<k $ such that lines ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF603D/13437fa3241cbf343a9baedf17e4ef1d1fb1c2fa.png) form an original triangle.

Explanation/Hint

Note that in the first sample, some of the lines pass through the origin. In the second sample, there is exactly one triple of lines: $ y=1,x+y=2,x-y=-2. $ The triangle they form has vertices $ (0,2),(1,1),(-1,1) $ . The circumcircle of this triangle has equation $ x^{2}+(y-1)^{2}=1 $ . This indeed passes through $ (0,0). $