According to Ernest Mayr, America's leading taxonomist, there are over 1 million species of animals in the world.When all
kinds of animals took boat,they found a problem.Each kind of animal had its own language,so the communication became
very hard.Assume that animal A could communicate with animal B but it couldn't communicate with animal C,while animal C
could only communicate with animal B. So,animal B must translate what one said to the other if animal A and animal C wanted
to communicate with each other.We called animal B translator.Noah wanted to know the least translators if two animals
wanted to communicate with each other.
输入格式
There will be only one test case.The first line contains two integers n(2 <= n <=200,000) and
m(1 <= m <= 300,000),where n represents the number of animals and m represents the number of pairs which could
communicate with each other. The next m li