1760 - [Baltic2009]Triangulation

Input

输入数据包含了一个正确的三角剖分结果。

Output

输出一行,包含了满足题意的最大分割数

Examples

Input

input 1
5 
1 2 3 2 
4 5 1 1 
3 1 4 2 

input 2
6 
1 4 2 1
2 4 5 2
6 2 5 3
3 6 5 1

Output

output 1


output 2
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题