n = int(input())

a = list(map(int, input().split()))
X = a.pop(0)
a = set(a)
b = list(map(int, input().split()))
Y = b.pop(0)
b = set(b)
c = list(map(int, input().split()))
Z = c.pop(0)
c = set(c)

a_bar = {x for x in range(1, n+1) if x not in a}

ans = (a_bar & c) | (b & c)
print(len(ans))

