There is a directed graph G with n vertices and m edges. The vertices are numbered 1,2,...,n, and for each i(1≤i≤m), the i-th directed edge goes from vertex xi to vertex yi.
G does not contain directed cycles.
Find the length of the longest directed path in G. Here, the length of a directed path is the number of edges in it.
The first line contains two integers: number of vertices n(2≤n≤105) and number of edges m(1≤m≤105). Each of the next m lines contains two integer xi,yi(1≤xi,yi≤n) that describe the edge of the graph.
Print the length of the longest directed path in G.