#include using namespace std; #define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; template using V=vector; template using VV=V>; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n; cin>>n; n*=2; V A(n),B(n); rep(i,n) cin>>A[i]; rep(i,n) cin>>B[i]; V> C(n); rep(i,n) C[i]={A[i]+B[i],A[i],B[i]}; sort(ALL(C)); ll a=0,b=0; rep(i,n){ if(i%2==0) a+=C[i][1]; else b+=C[i][2]; } cout<