CF216B Forming Teams
Description
One day $ n $ students come to the stadium. They want to play football, and for that they need to split into teams, the teams must have an equal number of people.
We know that this group of people has archenemies. Each student has at most two archenemies. Besides, if student $ A $ is an archenemy to student $ B $ , then student $ B $ is an archenemy to student $ A $ .
The students want to split so as no two archenemies were in one team. If splitting in the required manner is impossible, some students will have to sit on the bench.
Determine the minimum number of students you will have to send to the bench in order to form the two teams in the described manner and begin the game at last.
Input Format
The first line contains two integers $ n $ and $ m $ ( $ 2
Output Format
Print a single integer — the minimum number of students you will have to send to the bench in order to start the game.