N = int(input()) A = list(map(int, input().split())) B = list(map(int, input().split())) S = [A[i] + B[i] for i in range(2 * N)] S.sort() ans = - sum(B) for i in range(N): ans += S[2*i] print(ans)