#K67922. Maximum Communication Links

    ID: 32750 Type: Default 1000ms 256MiB

Maximum Communication Links

You are given n endpoints and a list of m restricted pairs. A direct communication link can be established between any two distinct endpoints, except for the pairs that are restricted. In other words, the total number of possible links without any restrictions is given by the formula \(\binom{n}{2} = \frac{n(n-1)}{2}\). However, for each restricted pair, you cannot form that link.

Your task is to calculate the maximum number of direct communication links that can be established, taking into account the restrictions provided.

Note: Even if a restricted pair is listed multiple times, it is only counted once.

inputFormat

The input is given via standard input (stdin) in the following format:

n m
a1 b1
a2 b2
... 
am bm

where the first line contains two integers n and m. The following m lines each contain two integers a and b representing a restricted pair of endpoints. The endpoints are numbered from 1 to n.

outputFormat

Print a single integer to standard output (stdout) representing the maximum number of direct communication links that can be established while obeying the restrictions.

## sample
5 0
10