A strongly connected component in a directed graph is an arbitrary set of vertices such that from any vertex of this set there is a path to any other vertex of this set, and there is no other set with a similar property containing this set.
Given a directed graph. Find the number of strongly connected components in it.
The first line contains two integers n and m (1≤n≤10,0≤m≤90) — number of vertices and edges in the graph, respectively. The next m lines describe the edges: i-th of these lines contains two integers ui and vi (1≤ui,vi≤n) — the start and the end of the i-th edge respectively. It is guaranteed that the graph has no loops or multiple edges.
Print the number of strongly connected components in the graph.