The figure below shows a food web of an ecosystem.
Figure 1: A food web diagram.
Given $n$ species and $m$ energy flow relationships, calculate the total number of food chains in the ecosystem.
Species are numbered from $1$ to $n$.
The $m$ energy flow relationships are given as: $a_1 \ b_1$ $a_2 \ b_2$ $a_3 \ b_3$ ... $a_{m-1} \ b_{m-1}$ $a_m \ b_m$
Where $a_i \ b_i$ indicates that energy flows from species $a_i$ to species $b_i$.
Input
The first line contains two integers $n$ and $m$.
The next $m$ lines each contain two integers $a_i$ and $b_i$, describing the $m$ energy flow relationships.
(The data is guaranteed to follow biological characteristics, and there will be no duplicate energy flow relationships.)
Output
A single integer representing the number of food chains in the food web.
Constraints
$1 \le N \le 100000$ $0 \le m \le 200000$ The answer is guaranteed to fit within a standard 32-bit signed integer.
Examples
Input 1
10 16 1 2 1 4 1 10 2 3 2 5 4 3 4 5 4 8 6 5 7 6 7 9 8 5 9 8 10 6 10 7 10 9
Output 1
9
Note
The example refers to the diagram in Figure 1. The species are numbered as follows: Grass: 1, Rabbit: 2, Fox: 3, Mouse: 4, Owl: 5, Insectivorous bird: 6, Spider: 7, Snake: 8, Frog: 9, Herbivorous insect: 10.