#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const int INF = 1000 * 1000 * 1000;
const long long LINF = INF * (long long)INF;
const int MAX = 150007;
const int MOD = 998244353;
int A[9];
int main(int argc, char* argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<int> A;
  vector<int> B;
  long long sa = 0, sb = 0;
  for (int i = (0); i < (n); i++) {
    int x;
    cin >> x;
    A.push_back(x);
    sa += x;
  }
  for (int i = (0); i < (m); i++) {
    int x;
    cin >> x;
    B.push_back(x);
    sb += x;
  }
  unsigned long long res = (unsigned long long)11 * INF * INF;
  sort(A.begin(), A.end());
  sort(B.begin(), B.end());
  unsigned long long c = sa;
  for (int i = (1); i < ((int)A.size() + 1); i++) {
    c -= A[(int)A.size() - i];
    res = min(res, c + sb * i);
  }
  c = sb;
  for (int i = (1); i < ((int)B.size() + 1); i++) {
    c -= B[(int)B.size() - i];
    res = min(res, c + sa * i);
  }
  cout << res << endl;
  return 0;
}
