#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
int main(){
  ll w,h;cin>>w>>h;
  ll i,j,k;
  ll p[w],q[h];
  priority_queue<P,vector<P>,greater<P> > qu;
  ll ans=0;
  for(i=0;i<w;i++){
    cin>>p[i];
    qu.push(P(p[i],0));
  }
  for(i=0;i<h;i++){
    cin>>q[i];
    qu.push(P(q[i],1));
  }
  while(!qu.empty()){
    P p=qu.top();qu.pop();
    if(p.second){
      ans+=p.first*(w+1);
      h--;
    }else{
      ans+=p.first*(h+1);
      w--;
    }
  }
  cout << ans << endl;
  return 0;
}
