N = int(input()) A = [int(i)for i in input().split()] B = [int(i)for i in input().split()] D = [int(i)for i in input().split()] D.sort(reverse=True) A.append(0) B.append(0) nowa = A.pop(0) nowb = B.pop(0) ans = 0 def kousin(): global nowa,nowb,A,B if nowa -A[0] < nowb -B[0]: nowa = A.pop(0) else: nowb = B.pop(0) return False kousin() for i in D: if i <= nowa +nowb: ans += 1 kousin() print(ans)