H. Street Layout
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
2 3 7
4 6
Output
1