
N = int(input())
X = [int(i) for i in input().split()]
Y = [int(i) for i in input().split()]
Z = [int(i) for i in input().split()]

table = [[0 for i in range(3)] for j in range(N)]

for i in range(1, len(X)):
    table[X[i] - 1][0] = 1
for i in range(1, len(Y)):
    table[Y[i] - 1][1] = 1
for i in range(1, len(Z)):
    table[Z[i] - 1][2] = 1

ans = 0
for i in range(len(table)):
    if (table[i][0] == 0 and table[i][2] == 1) or (table[i][1] == 1 and table[i][2] == 1):
        ans = ans + 1
print(ans)

