Problem Description

Read n m and then m edges. Some edge lines may be broken or have nodes out of range. Ignore invalid edges. Output number of connected components in resulting graph.

Input Format

First line n m. Next m lines edges u v.

Output Format

One integer components.

Sample Test Case

Input:
5 6 1 2 2 3 x y 3 6 4 5 2 3
Output:
2

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next