#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const int M = 100100;

vector<pair<int, int>> roads;

int a[2];

void read() {
  cin >> a[0] >> a[1];

  for (int j = 0; j < 2; ++j) {
    for (int i = 0; i < a[j]; ++i) {
      int x;
      cin >> x;
      roads.emplace_back(x, j);
    }
  }
}

void kill() {
  sort(roads.begin(), roads.end());

  ll ans = 0;

  for (auto e : roads) {
    int cost = e.first;
    int j = e.second;
    ans += 1ll * cost * (a[j ^ 1] + 1);
    a[j]--;
  }

  cout << ans << endl;
}

int main() {
  cout.precision(20);
  cout << fixed;
  ios_base::sync_with_stdio(false);
  read();
  kill();
}
