Domino
A set of dominoes consists of rectangular tiles, each divided into two halves by a line parallel to the shorter side. Each half displays a number of dots, ranging from 0 to M inclusive. A complete set of dominoes includes all possible unique pairs of these numbers. For instance, if M is 3, the complete set contains 10 tiles: (0, 0), (0, 1), (0, 2), (0, 3), (1, 1), (1, 2), (1, 3), (2, 2), (2, 3), (3, 3). Chains can be formed by connecting tiles at their shorter sides if the number of dots on the adjacent halves matches. Some tiles have been removed from the complete set. Your task is to determine the minimum number of chains required to arrange the remaining tiles so that each tile is part of exactly one chain.
Write a program that, given the information about the set of dominoes, calculates the minimum number of chains needed.
Input
The first line contains a single integer M (0 ≤ M ≤ 100), representing the maximum number of dots on one half of a tile. The second line contains a single integer N, indicating the number of tiles removed from the complete set. Each of the following N lines contains two numbers A_i and B_i, which are the numbers of dots on the halves of the i-th removed tile.
Output
Output a single integer L - the minimum number of chains needed.