<gh_stars>1-10
_ = input()

a = set(input().split())
_=input()
b = set(input().split())

print(len(a.difference(b)))

_ = input()

a = set(input().split())
_=input()
b = set(input().split())

print(len(a.difference(b)))