N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) D = list(map(int, input().split())) D.sort(reverse=True) l = -1 r = N while r - l > 1: m = (l + r) // 2 dp = [[False for j in range(N+1-m)] for i in range(N+1-m)] dp[0][0] = True for i in range(N-m): for j in range(N-m): if i + j + m >= N: continue if not dp[i][j]: continue if A[i+1] + B[j] >= D[i+j+m]: dp[i+1][j] = True if A[i] + B[j+1] >= D[i+j+m]: dp[i][j+1] = True ans = 0 for i in range(N+1-m): for j in range(N+1-m): if dp[i][j]: ans = max(ans, i+j) if ans == N - m: r = m else: l = m print(N - r)