n = int(input())
x,*a = list(map(int, input().split()))
y,*b = list(map(int, input().split()))
z,*c = list(map(int, input().split()))

u = set(range(1,n+1))
a = set(a)
b = set(b)
c = set(c)

s1 = (u - a) & c
s2 = b & c
s3 = s1 & s2

print(len(s1) + len(s2) -len(s3))
