ADABASH - Ada and Servers

no tags

Ada the Ladybug has just bought a few servers. She is not a programming bug so she needs a server administrator to set everything for her. Yay, she have chosen you to help her. Your first job is simple - the servers are (somehow) connected with wires and you have to find out the number of components they form.

Easy isn't it? Well sadly the servers are raw and nothing is (can be) installed on them (at the moment), so you can only use bash.

Input

The first line of input containts 1 ≤ N ≤ 600, 0 ≤ M ≤ 600, the number of servers and the number of wires between them. The next M lines contains two integers 0 ≤ a, b < N, the servers which are connected by wires.