#include <bits/stdc++.h>
using namespace std;
const double PI = 3.1415926535897932384626;
const long long mod = 1000000007;
void solve() {
  long long n, m;
  cin >> n >> m;
  map<long long, long long> mp;
  long long b, g[m], ans = 0, mxb = 0;
  for (long long i = 0; i < n; i++) {
    cin >> b;
    mp[b] += m;
    mxb = max(mxb, b);
    ans += m * b;
  }
  for (long long i = 0; i < m; i++) cin >> g[i];
  for (long long i = 0; i < m; i++)
    if (g[i] < mxb) {
      cout << "-1\n";
      return;
    }
  vector<long long> orig_cnts;
  for (auto P : mp) orig_cnts.push_back(P.second);
  for (long long i = 0; i < m; i++) {
    if (mp.count(g[i]) && mp[g[i]] > 0) {
      mp[g[i]]--;
      g[i] = -1;
    }
  }
  long long k = 0;
  for (auto& P : mp) {
    if (P.second == orig_cnts[k]) P.second--;
    k++;
  }
  for (auto it = mp.begin(), nxt = it; it != mp.end(); it = nxt) {
    nxt = it;
    nxt++;
    if (it->second == 0) mp.erase(it);
  }
  for (long long i = 0; i < m; i++) {
    if (g[i] == -1) continue;
    auto it = mp.upper_bound(g[i]);
    if (it != mp.begin()) {
      it--;
      ans += g[i] - it->first;
      long long cnt = --mp[it->first];
      if (cnt == 0) mp.erase(it->first);
    }
  }
  cout << ans << endl;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  for (long long i = 1; i <= t; i++) {
    solve();
  }
  return 0;
}
