#include <bits/stdc++.h>
using namespace std;
int const INF = (int)1e9 + 1e3;
long long const INFL = (long long)1e18 + 1e6;
mt19937 tw(chrono::high_resolution_clock::now().time_since_epoch().count());
uniform_int_distribution<long long> ll_distr;
long long rnd(long long a, long long b) {
  return ll_distr(tw) % (b - a + 1) + a;
}
void solve() {
  int n, m;
  cin >> n >> m;
  long long ans = 0;
  multiset<pair<int, int> > have;
  int maxv = 0;
  for (int i = 0; i < n; ++i) {
    int num;
    cin >> num;
    maxv = max(maxv, num);
    ans += (long long)num * m;
    have.insert({num, m - 1});
  }
  for (int i = 0; i < m; ++i) {
    int num;
    cin >> num;
    if (num < maxv) {
      cout << "-1\n";
      return;
    }
    if (num == maxv) {
      continue;
    }
    while (((int)have.size()) && (--have.end())->second == 0) {
      have.erase(--have.end());
    }
    if (!((int)have.size())) {
      cout << "-1\n";
      return;
    }
    auto p = *--have.end();
    have.erase(--have.end());
    ans += num - p.first;
    p.second--;
    have.insert(p);
  }
  cout << ans << "\n";
}
int main() {
  cout << setprecision(15) << fixed;
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int test_count = 1;
  for (int test = 1; test <= test_count; ++test) {
    solve();
  }
}
