NOTE assume all numbers are different nums1 set int arg for arg in inp

1
2
3
4
5
# NOTE: assume all numbers are different
nums1 = set([int(arg) for arg in input().split()])
nums2 = set([int(arg) for arg in input().split()])
print(len(nums1.intersection(nums2)))