Before the gates of the lantern lake of Firefly Mere close for winter, Vani must finish the registers ledger - one figure at a time. Task: Print the number of distinct values that appear in both arrays. Input format: First line: n and m. Second line: n integers. Third line: m integers. Output format: Print the size of the intersection. Constraints: 1 <= n <= 571; 0 <= a[i],x <= 1000000.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= n <= 571; 0 <= a[i],x <= 1000000.
