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

_a = set(range(1, n+1)) ^ set(a)
match1 = set(_a) & set(c)
match2 = set(b) & set(c)
print(len(match1 | match2))
