#No idea (hackerRank)
#Link- https://www.hackerrank.com/challenges/no-idea/problem

x=str(input()).split()
# print (n)
n=int(x[0])
m=int(x[1])
#print(n,m,sep=",")
set1=list(map(int,input().split()))
print (set1)
set2=set(map(int,input().split()));
set3=set(map(int,input().split()))
happy=0
for i in set1:
    if i in set2:
        happy+=1
    elif i in set3:
        happy-=1
print (happy)

5a190612c3fd834dd462e436aff375e1ef5b20d4
<mask token>

<mask token>
print(set1)
<mask token>
for i in set1:
    if i in set2:
        happy += 1
    elif i in set3:
        happy -= 1
print(happy)

x = str(input()).split()
n = int(x[0])
m = int(x[1])
set1 = list(map(int, input().split()))
print(set1)
set2 = set(map(int, input().split()))
set3 = set(map(int, input().split()))
happy = 0
for i in set1:
    if i in set2:
        happy += 1
    elif i in set3:
        happy -= 1
print(happy)

#No idea (hackerRank)
#Link- https://www.hackerrank.com/challenges/no-idea/problem

x=str(input()).split()
# print (n)
n=int(x[0])
m=int(x[1])
#print(n,m,sep=",")
set1=list(map(int,input().split()))
print (set1)
set2=set(map(int,input().split()));
set3=set(map(int,input().split()))
happy=0
for i in set1:
    if i in set2:
        happy+=1
    elif i in set3:
        happy-=1
print (happy)
