#include <bits/stdc++.h>
using namespace std;

#define int long long

signed main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cout << fixed << setprecision(12);

  int H, W;
  cin >> H >> W;

  vector<int> A(H);
  for ( int i = 0; i < H; i++ ) {
    cin >> A[i];    
  }

  sort(A.begin(), A.end());
  vector<int> cum(H, 0);  
  cum[0] = A[0];
  for ( int i = 1; i < H; i++ ) {
    cum[i] += cum[i-1]+A[i];    
  }

  int ans = 0;
  for ( int i = 0; i < W; i++ ) {
    int b;
    cin >> b;
    int p = upper_bound(A.begin(), A.end(), b) - A.begin();
    p--;
    if ( p >= 0 ) ans += cum[p];
    if ( H-p-1 >= 0 ) ans += b*(H-p-1);    
  }

  cout << ans << endl;
  
  return 0;
}

