Given a directed graph with vertices and edges. The vertices are numbered from to . For each i~(1 \le i \le m), a directed edge from vertex x_i to vertex y_i is given.
The graph contains no directed cycles.
Find the length of the longest directed path in . The length of a path is defined as the number of edges in that path.
The first line contains two integers: the number of vertices n~(2 \le n \le 10^5) and the number of edges m~(1 \le m \le 10^5) of the graph. Each of the next lines contains two integers x_i, y_i~(1 \le x_i, y_i \le n), describing a directed edge from vertex x_i to vertex y_i.
Print the length of the longest directed path in the graph .

Example 1
Example 2
Example 3