A directed unweighted graph is given. For a specified vertex , find a vertex from which the shortest distance to is maximized among all vertices, and output this maximal shortest distance.
The first line contains three positive integers , , and (1 \le s \le n \le 5000, 1 \le m \le 20000) — the number of vertices, the number of edges in the graph, and the index of the specified vertex, respectively. Each of the next lines contains two integers, the start and end vertices of an edge.
Print the maximum shortest distance from any vertex to .

Example 1
Example 2