A. AIstartup
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
3 2 10
1 3
1 2
2 1
1 2
Output
27