#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll const inf = 1000 * 1000;
int const N = (1 << 17) + 2;
int A, B, h, w, n;
int p[N];
bool run(int sz) {
  int m = sz >> 1;
  int k = sz - m;
  vector<pair<ll, ll>> lf(1 << m, {1, 1});
  vector<pair<ll, ll>> rg(1 << k, {1, 1});
  for (int i = 0; i < (1 << m); ++i) {
    for (int j = 0; j < 20; ++j) {
      if ((i & (1 << j)) != 0) lf[i].first = min(inf, lf[i].first * p[j]);
    }
  }
  for (int i = 0; i < (1 << k); ++i) {
    for (int j = 0; j < 20; ++j) {
      if ((i & (1 << j)) != 0) rg[i].first = min(inf, rg[i].first * p[j + m]);
    }
  }
  int mask = (1 << m) - 1;
  for (int i = 0; i < (1 << m); ++i) lf[i].second = lf[mask & ~i].first;
  mask = (1 << k) - 1;
  for (int i = 0; i < (1 << k); ++i) rg[i].second = rg[mask & ~i].first;
  sort(rg.begin(), rg.end(), greater<pair<ll, ll>>());
  for (int rot = 0; rot < 2; ++rot) {
    for (int i = 0; i < (1 << m); ++i) {
      ll x = w * lf[i].first;
      int l = 0;
      int r = rg.size() - 1;
      int i1 = -1;
      while (l <= r) {
        int mid = l + r >> 1;
        if (rg[mid].first * x >= A)
          l = mid + 1, i1 = mid;
        else
          r = mid - 1;
      }
      l = 0;
      r = rg.size() - 1;
      int i2 = -1;
      while (l <= r) {
        int mid = l + r >> 1;
        if (rg[mid].first * x >= B)
          l = mid + 1, i2 = mid;
        else
          r = mid - 1;
      }
      if (0 <= i1 && B <= h * lf[i].second * rg[i1].second ||
          0 <= i2 && A <= h * lf[i].second * rg[i2].second)
        return true;
    }
    swap(w, h);
  }
  return false;
}
int main() {
  scanf("%d %d %d %d %d", &A, &B, &h, &w, &n);
  for (int i = 0; i < n; ++i) scanf("%d", p + i);
  sort(p, p + n, greater<int>());
  n = min(n, 34);
  if (A > B) swap(A, B);
  if (w > h) swap(w, h);
  if (A <= w && B <= h) {
    cout << 0 << endl;
    return 0;
  }
  int l = 1;
  int r = n;
  int ans = -1;
  while (l <= r) {
    int m = l + r >> 1;
    if (run(m))
      r = m - 1, ans = m;
    else
      l = m + 1;
  }
  printf("%d\n", ans);
}
