#include<bits/stdc++.h>
using namespace std;
#define lp(i,n) for(int i=0;i<n;i++)
#define lps(i,j,n) for(int i=j;i<n;i++)
#define fordebug int hoge;cin>>hoge;
#define DEKAI 1000000007;
#define INF (1<<28)
#define int long long
#define double long double
#define floot10 cout<<fixed<<setprecision(10)


signed main(){
  int h,w;
  cin>>h>>w;
  vector<int> a,b;
  lp(i,h){
    int x;
    cin>>x;
    a.push_back(x);
  }
  lp(i,w){
    int x;
    cin>>x;
    b.push_back(x);
  }
  sort(a.begin(),a.end());
  sort(b.begin(),b.end());
  int bit=0,bsum=0,ans=0;
  lp(i,a.size()){
    int now=a[i];
    while(1){
      if(bit==b.size()) break;
      if(b[bit]<now){
	bsum+=b[bit];
	bit++;
      }
      else{
	break;
      }
    }
    ans+=now*(w-bit)+bsum;
  }
  cout<<ans<<endl;
  return 0;
}



