a=int(input()) W=list(map(int,input().split())) b=int(input()) B=list(map(int,input().split())) W=[(w,0) for w in W] B=[(b,1) for b in B] A=W+B A.sort() ANS=1 now=A[0][1] for i in range(1,len(A)): if A[i][0]!=A[i-1][0] and A[i][1]!=now: ANS+=1 now^=1 print(ANS)