n = int(input()); z = 998244353 x = list(map(int,input().split())) y = list(map(int,input().split())) m = sorted(x+y)[n]; p = q = 0; a = [1]*(n+1) for v in x: p += v