To remember how many alts that she has on WLMOJ, total accounts and
connections between the accounts, find the number of accounts that needs to write usernames on to re-create the tree.
A tree is defined as a connected graph with one simple path between any pair of vertices, or in this case, one connection between any two of
's alts.Input Specification
The first line will contain an integer
, the number of alts that has in total, and also an integer
, the number of alts that are still connected.
Output Specification
One integer, the number of alts that
needs to connect to form the original tree.Sample Input 1
2 1
Sample Output 1
0
Sample Input 2
6 3
Sample Output 2
2
Comments