import bisect N = int(input()) A = [int(a) for a in input().split()] B = [int(a) for a in input().split()] D = [int(a) for a in input().split()] D.sort() c = A[0]+B[0] i = 0 j = 0 ans = 0 while ans < N: if A[i+1]+B[j] > A[i]+B[j+1]: i += 1 else: j += 1 if A[i]+B[j] < D[0]: break ans += 1 if A[i]+B[j] >= D[-1]: D.pop(-1) continue idx = bisect.bisect_left(D, A[i]+B[j]) D.pop(idx) print(ans)