n = int(input())
s = input()
a = [int(num) for num in s.split()]
s = input()
b = [int(num) for num in s.split()]
s = input()
c = [int(num) for num in s.split()]

isa = []
isb = []
isc = []
for i in range(n + 1):
    isa.append(False)
    isb.append(False)
    isc.append(False)

for i in range(1, a[0] + 1):
    isa[a[i]] = True
for i in range(1, b[0] + 1):
    isb[b[i]] = True
for i in range(1, c[0] + 1):
    isc[c[i]] = True

C = c[0]
CA = 0
ABC = 0
for i in range(1, n + 1):
    if isc[i] & isa[i]:
        CA += 1
    if isa[i] & isb[i] & isc[i]:
        ABC += 1

print(C - CA + ABC)