#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, m;
  cin >> n >> m;
  vector<long long> a(n), b(m);
  for (long long i = 0; i < a.size(); cin >> a[i++])
    ;
  ;
  for (long long i = 0; i < b.size(); cin >> b[i++])
    ;
  ;
  sort(a.begin(), a.end());
  ;
  sort(b.begin(), b.end());
  ;
  int i = n - 1, j = m - 1;
  long long ans = 0;
  while (i >= 0) {
    long long count = m;
    while (j >= 0 && count > 1 && a[i] <= b[j]) {
      count--;
      ans += b[j];
      j--;
    }
    if (count == 1 && j >= 0 && a[i] == b[j]) {
      ans += b[j];
      i--;
      j--;
    } else {
      ans += count * a[i];
      i--;
    }
  }
  if (b[0] < a[n - 1]) {
    cout << "-1";
    return 0;
  }
  cout << ans;
  return 0;
}
