N=int(input())
X=list(map(int,input().split()))
Y=list(map(int,input().split()))
Z=list(map(int,input().split()))

X.pop(0)
Y.pop(0)
Z.pop(0)

result=[i for i in Z if i not in X or i in Y]
print(len(result))
