A strongly connected component in a directed graph is a maximal set of vertices such that for every pair of vertices and in the set, there is a path from to and from to .
Given a directed graph, find the number of strongly connected components in it.
The first line contains two integers and (1 \leq n \leq 10, 0 \leq m \leq 90) — the number of vertices and edges in the graph, respectively.
Each of the next lines contains two integers u_i and v_i (1 \leq u_i, v_i \leq n), describing a directed edge from vertex u_i to vertex v_i.
It is guaranteed that the graph contains no loops (edges from a vertex to itself) and no multiple edges (edges with the same start and end).
Print one integer — the number of strongly connected components in the given graph.

Example 1
Example 2