#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e5 + 5;
const long long MOD = 1e9 + 7;
const double EPS = 1e-8;
bool cmp(int x, int y) { return x > y; }
int a[MAX_N], b[MAX_N];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= m; i++) scanf("%d", &b[i]);
  sort(a + 1, a + n + 1, cmp);
  sort(b + 1, b + m + 1, cmp);
  int pos = 1;
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    int cnt = 0;
    while (pos <= m) {
      if (cnt == m - 1) break;
      if (b[pos] >= a[i]) {
        ans += b[pos];
        cnt++;
        pos++;
      } else
        break;
    }
    if (cnt == m - 1) {
      if (pos <= m && b[pos] == a[i]) {
        ans += b[pos];
        cnt++;
        pos++;
      }
    }
    ans += 1LL * a[i] * (m - cnt);
  }
  if (pos == m + 1 && a[1] <= b[m]) {
    printf("%lld\n", ans);
  } else
    printf("-1\n");
  return 0;
}
