C. Trip Counting III
time limit per test
2 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output
Examples
Input
5 5
1 2
2 3
3 4
4 5
1 5
Output
10
Input
4 6
1 2
1 3
1 4
2 3
2 4
3 4
Output
0