#include <bits/stdc++.h>
using namespace std;
const int N = 100 * 1000 + 5;
int a[N];
int b[N];
int dif[N];
int main() {
  int n, ans = 0;
  long long s = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    dif[i] = a[i] - b[i];
  }
  sort(dif, dif + n);
  for (int i = 0; dif[i] < 0; i++) {
    s += dif[i];
    ans++;
  }
  for (int i = n - 1; i >= 0 && s < 0; i--) {
    s += dif[i];
    ans++;
  }
  if (s < 0)
    cout << -1 << endl;
  else
    cout << ans << endl;
  return 0;
}
