#include <bits/stdc++.h>
using namespace std;
long long a, b, h, w, n, ans = (1LL << 60), indx = 0;
long long ara[100009];
void solve(long long pos, long long hh, long long ww, long long step) {
  if (hh >= a && ww >= b) {
    ans = min(ans, step);
    return;
  }
  if (pos >= indx) return;
  if (ara[pos] == 2) {
    while (pos < indx && hh < a) step++, hh *= ara[pos], pos++;
    while (pos < indx && ww < b) step++, ww *= ara[pos], pos++;
    if (hh >= a && ww >= b) ans = min(ans, step);
    return;
  }
  if (hh < a) solve(pos + 1, hh * ara[pos], ww, step + 1);
  if (ww < b) solve(pos + 1, hh, ww * ara[pos], step + 1);
}
int main() {
  cin >> a >> b >> h >> w >> n;
  for (long long i = 1; i <= n; i++) {
    scanf("%lld", &ara[indx]);
    if (ara[indx] == 1) continue;
    indx++;
  }
  if (a > b) swap(a, b);
  if (h > w) swap(h, w);
  if (a <= h && b <= w) {
    cout << 0 << endl;
    return 0;
  }
  if (indx == 0) {
    cout << -1 << endl;
    return 0;
  }
  sort(ara, ara + indx, greater<long long>());
  solve(0, h, w, 0);
  solve(0, w, h, 0);
  if (ans == (1LL << 60))
    cout << -1 << endl;
  else
    cout << ans << endl;
  return 0;
}
