from __future__ import annotations
def 					__lowercase						(    lowerCamelCase__       )					->List[str]:

  '''simple docstring'''




  global graph, reversed_graph, scc, component, visit, stack
  if visit[u]:
    return
  a__  		=  True
  for v in graph[u]:
    dfs(lowerCamelCase__       )
  stack.append(lowerCamelCase__       )
def 					__lowercase						(    lowerCamelCase__       )					->Optional[int]:

  '''simple docstring'''




  global graph, reversed_graph, scc, component, visit, stack
  if visit[u]:
    return
  a__  		=  True
  component.append(lowerCamelCase__       )
  for v in reversed_graph[u]:
    dfsa(lowerCamelCase__       )
def 					__lowercase						(    )					->Optional[Any]:

  '''simple docstring'''




  global graph, reversed_graph, scc, component, visit, stack
  for i in range(lowerCamelCase__       ):
    dfs(lowerCamelCase__       )
  a__  		=  [False] * n
  for i in stack[::-1]:
    if visit[i]:
      continue
    a__  		=  []
    dfsa(lowerCamelCase__       )
    scc.append(lowerCamelCase__       )
  return scc


if __name__ == "__main__":
     # n - no of nodes, m - no of edges
     _SCREAMING_SNAKE_CASE    ,      _SCREAMING_SNAKE_CASE     =     list(map(int, input().strip().split()))

     _SCREAMING_SNAKE_CASE     =     [[] for _ in range(n)]  # graph
     _SCREAMING_SNAKE_CASE     =     [[] for i in range(n)]  # reversed graph
     # input graph data (edges)
     for _ in range(m):
          _SCREAMING_SNAKE_CASE    ,      _SCREAMING_SNAKE_CASE     =     list(map(int, input().strip().split()))
          graph[u].append(v)
          reversed_graph[v].append(u)

     _SCREAMING_SNAKE_CASE     =     []
     _SCREAMING_SNAKE_CASE     =     [False] * n
     _SCREAMING_SNAKE_CASE     =     []
     _SCREAMING_SNAKE_CASE     =     []
     print(kosaraju())


from collections.abc import Callable

_SCREAMING_SNAKE_CASE     =     Callable[[float], float]  # type alias for a real -> real function
def 					__lowercase						(    lowerCamelCase__			,					lowerCamelCase__			,					lowerCamelCase__			,					)					->float:

  '''simple docstring'''




  a__  		=  float(lowerCamelCase__       )
  while True:
    try:
      a__  		=  prev_guess - function(lowerCamelCase__       ) / derivative(lowerCamelCase__       )
    except ZeroDivisionError:
      raise ZeroDivisionError("Could not find root"       ) from None
    if abs(prev_guess - next_guess       ) < 10**-5:
      return next_guess
    a__  		=  next_guess
def 					__lowercase						(    lowerCamelCase__       )					->float:

  '''simple docstring'''




  return (x**3) - (2 * x) - 5
def 					__lowercase						(    lowerCamelCase__       )					->float:

  '''simple docstring'''




  return 3 * (x**2) - 2


if __name__ == "__main__":
     print(newton(f, fa, 3))

