#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int N = 1e5 + 7;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  vector<long long> b(n), g(m);
  long long mx = 0;
  for (int i = 0; i < n; i++) {
    cin >> b[i];
  }
  multiset<long long> s;
  for (int i = 0; i < m; i++) {
    cin >> g[i];
    s.insert(g[i]);
  }
  sort(b.begin(), b.end());
  if (b[n - 1] > *s.begin()) {
    cout << -1 << endl;
    return 0;
  }
  long long res = 0;
  for (int i = n - 1; i >= 0; i--) {
    int c = m;
    while (true) {
      auto it = s.find(b[i]);
      if (it == s.end()) break;
      res += b[i];
      c--;
      s.erase(it);
    }
    if (c == m) {
      res += b[i];
      c--;
    }
    while (c > 0) {
      auto it = s.lower_bound(b[i]);
      if (it == s.end()) break;
      res += *it;
      c--;
      s.erase(it);
    }
    res += c * b[i];
  }
  cout << res << endl;
  return 0;
}
