#include<bits/stdc++.h>
using namespace std;
typedef long long ll; 
typedef pair<ll,bool> P;
ll w,h;
ll ans;
vector<P> v;
int main(){
  cin>>w>>h;
  for(int i=0,p;i<w;i++)cin>>p,v.push_back(P(p,0));
  for(int i=0,q;i<h;i++)cin>>q,v.push_back(P(q,1));
  sort(v.begin(),v.end());
  ll t=0,y=0;
  for(int i=0;i<v.size();i++)
    if(!v[i].second){
      ll k=h+1-y;
      t++;
      ans+=k*v[i].first;
    }
    else{
      ll k=w+1-t;
      y++;
      ans+=k*v[i].first;
    }
  cout<<ans<<endl;
  return 0;
}