Two collections
Twins Sasha and Pasha are avid stamp collectors, each maintaining their own collection. They strive to keep their collections equal in size, which means both collections always contain the same number of stamps. This balance can be challenging to maintain, as sometimes Sasha or Pasha must purchase stamps they already own. But what happens when Pasha acquires a new rare stamp? Obtaining another identical rare stamp might be impossible, and buying a different rarity can be difficult... So, they might end up buying the first available stamp they find!
It's intriguing to determine how many unique stamps are common between Pasha's and Sasha's collections. To help them with this, write a program that calculates the number of distinct stamps that appear in both collections. Perhaps, upon seeing the results, they might decide to merge their collections into one!
Input
The first line of the input contains a single integer N—the number of stamps in each collection. The following two lines each contain N integers, representing the indices of the stamps in the catalog used by Pasha and Sasha. It is guaranteed that these indices are positive integers not exceeding 1000000, and the number of stamps N is at most 10000.
Output
Output the number of unique stamp indices that are present in both collections. Only distinct stamp indices should be considered.