cho.sh
Notes
Loading...

Symmetric Difference

Time limit

2s

Memory limit

256 MB

Problem

There are two non-empty sets A and B whose elements are natural numbers. The symmetric difference of two sets is the union of A - B and B - A. In other words, it is the set of elements that belong to exactly one of the two sets.

Given sets A and B, find the number of elements in their symmetric difference.

For example, if A = {1, 2, 4} and B = {2, 3, 4, 5, 6}, then A - B = {1} and B - A = {3, 5, 6}, so the symmetric difference contains 4 elements.

Input

The first line contains the number of elements in set A and the number of elements in set B, separated by a space.

The second line contains all elements of set A, and the third line contains all elements of set B, each separated by spaces.

Each set has at most 200,000 elements, and every element is a natural number not greater than 100,000,000.

Output

Print the number of elements in the symmetric difference of the two sets.