#include <bits/stdc++.h>
using namespace std;
long long sol(long long a, long long b, long long h, long long w, int n,
              vector<long long> v) {
  int p = 0;
  long long th = h, tw = w;
  for (; p < n; ++p) {
    if (th < a)
      th *= v[p];
    else if (tw < b)
      tw *= v[p];
    else
      break;
  }
  n = p;
  v.resize(p);
  auto solve = [&]() {
    if (h >= a && w >= b) return true;
    if (n < 20) {
      for (int i = 0; i < 1 << n; ++i) {
        th = h, tw = w;
        for (int j = 0; j < n; ++j) {
          if (i >> j & 1) {
            if (th < a) th *= v[j];
          } else {
            if (tw < b) tw *= v[j];
          }
        }
        if (th >= a && tw >= b) return true;
      }
      return false;
    }
    int m1 = n / 2, m2 = n - m1;
    vector<pair<long long, long long>> x;
    for (int i = 0; i < 1 << m1; ++i) {
      th = 1, tw = 1;
      for (int j = 0; j < m1; ++j) {
        if (i >> j & 1) {
          if (th * h < a) th *= v[j];
        } else {
          if (tw * w < b) tw *= v[j];
        }
      }
      x.push_back({min(th, a), min(tw, b)});
    }
    sort(x.begin(), x.end());
    vector<long long> mx(x.size());
    for (int i = x.size() - 1; i >= 0; --i) {
      mx[i] = x[i].second;
      if (i + 1 < x.size()) mx[i] = max(mx[i], mx[i + 1]);
    }
    for (int i = 0; i < 1 << m2; ++i) {
      th = 1, tw = 1;
      for (int j = 0; j < m2; ++j) {
        if (i >> j & 1) {
          if (th * h < a) th *= v[m1 + j];
        } else {
          if (tw * w < b) tw *= v[m1 + j];
        }
      }
      long long val = (a + h * th - 1) / (h * th);
      auto it = lower_bound(x.begin(), x.end(), make_pair(val, 0LL));
      if (it != x.end()) {
        if (mx[it - x.begin()] * min(tw, b) * w >= b) return true;
      }
    }
    return false;
  };
  int l = 0, r = p;
  while (l < r) {
    n = (l + r) >> 1;
    if (solve())
      r = n;
    else
      l = n + 1;
  }
  n = l;
  if (solve()) return n;
  return 1 << 30;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  long long a, b, h, w, n;
  cin >> a >> b >> h >> w >> n;
  vector<long long> v(n);
  for (auto &i : v) cin >> i;
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  int ans = min(sol(a, b, h, w, n, v), sol(b, a, h, w, n, v));
  if (ans == 1 << 30) ans = -1;
  cout << ans << "\n";
  return 0;
}
