P11628 [AOJ] RabbitWalking
普及
题目描述

Example

Input

8 5
1 2
6 5
6 4
1 3
4 7

Output

11

输入格式

见题面

输出格式

见题面

样例输入
8 5 1 2 6 5 6 4 1 3 4 7
样例输出
11