n = int(input())
mp = [[0, 0, 0] for _ in range(n)]
xs = list(map(int, input().split()))
ys = list(map(int, input().split()))
zs = list(map(int, input().split()))

for a in xs[1:]:
  mp[a - 1][0] = 1
for b in ys[1:]:
  mp[b - 1][1] = 1
for c in zs[1:]:
  mp[c - 1][2] = 1

ans = 0
for t in mp:
  if t[2] and ((not t[0]) or t[1]):
    ans += 1
print(ans)

