N=int(input())
a,b,c=list(map(int,input().split())),list(map(int,input().split())),list(map(int,input().split()))
d=set(a[1:]+b[1:]+c[1:])
ans=0
for e in d:
    if(e not in a[1:]and e in c[1:])or( e in b[1:]and e in c[1:]):
        ans+=1
print(ans)