#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, m;
  cin >> n >> m;
  long long int a[n], b[m], mx = 0, mn = LONG_MAX;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    mx = max(mx, a[i]);
  }
  for (int i = 0; i < m; i++) {
    cin >> b[i];
    mn = min(mn, b[i]);
  }
  if (mx > mn) {
    cout << "-1";
    return 0;
  }
  sort(a, a + n);
  sort(b, b + m);
  long long int done = m, ans = 0;
  for (int i = n - 1; i >= 0; i--) {
    long long int lo = 0, hi = m - 1;
    while (lo <= hi) {
      long long int mid = (lo + hi) / 2;
      if (a[i] > b[mid]) {
        lo = mid + 1;
      } else {
        if (mid > 0 && b[mid - 1] >= a[i]) {
          hi = mid - 1;
        } else {
          if (a[i] < b[mid] && done == m && mid == 0) {
            for (int j = mid + 1; j < done; j++) {
              ans += b[j];
            }
            ans += a[i];
            done = mid + 1;
          } else {
            for (int j = mid; j < done; j++) {
              ans += b[j];
            }
            ans += a[i] * (m - done + mid);
            done = mid;
          }
          break;
        }
      }
    }
  }
  cout << ans;
}
