#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long n, m, a, b, c, k, temp, x, y;
const int MAXN = 1e5 + 11, mod = 1e9 + 7;
inline long long max(long long a, long long b) { return ((a > b) ? a : b); }
inline long long min(long long a, long long b) { return ((a > b) ? b : a); }
inline vector<long long> read(int n) {
  vector<long long> v(n);
  for (int i = 0; i < v.size(); i++) cin >> v[i];
  return v;
}
vector<pair<long long, long long> > vec[20];
void sol() {
  long long h, w;
  cin >> a >> b >> h >> w >> n;
  vector<long long> v = read(n);
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  while (v.size() > 34) v.pop_back();
  if ((a <= h && b <= w) || (a <= w && b <= h)) {
    cout << 0;
    return;
  }
  if (n == 1) {
    if (a > h && b > w)
      cout << -1;
    else if (a <= h * v[0] && b <= w)
      cout << 1;
    else if (a <= h && b <= w * v[0])
      cout << 1;
    else if (a <= w && b <= v[0] * h)
      cout << 1;
    else if (a <= w * v[0] && b <= h)
      cout << 1;
    else
      cout << -1;
    return;
  }
  n = v.size();
  int mi = 35;
  int f = n / 2;
  vec[0].emplace_back(1, 1);
  for (int use = 1; use <= f; use++) {
    for (int mask = 0; mask < (1 << use); mask++) {
      long long ap = 1, bp = 1;
      for (int j = 0; j < use; j++) {
        if (mask & (1 << j)) {
          ap *= v[j];
          ap = min(MAXN, ap);
        } else {
          bp *= v[j];
          bp = min(MAXN, bp);
        }
      }
      if (ap * h >= a && bp * w >= b) mi = min(mi, use);
      vec[use].emplace_back(ap, bp);
    }
    sort(vec[use].begin(), vec[use].end());
    for (int i = vec[use].size() - 2; i >= 0; i--) {
      vec[use][i].second = max(vec[use][i + 1].second, vec[use][i].second);
    }
  }
  for (int use = 1; use <= n - f; use++) {
    for (int mask = 0; mask < (1 << use); mask++) {
      long long ap = 1, bp = 1;
      for (int j = 0; j < use; j++) {
        if (mask & (1 << j)) {
          ap *= v[j + f];
          ap = min(MAXN, ap);
        } else {
          bp *= v[j + f];
          bp = min(MAXN, bp);
        }
      }
      long long na = (a + (ap * h) - 1);
      na /= (ap * h);
      long long nb = (b + (bp * w) - 1);
      nb /= (bp * w);
      pair<long long, long long> need = {na, nb};
      for (int j = 0; j < 20; j++) {
        auto it = lower_bound(vec[j].begin(), vec[j].end(), need);
        if (it != vec[j].end() && (*it).second >= need.second)
          mi = min(mi, use + j);
      }
    }
  }
  swap(a, b);
  for (int i = 0; i < 20; i++) vec[i].clear();
  vec[0].emplace_back(1, 1);
  for (int use = 1; use <= f; use++) {
    for (int mask = 0; mask < (1 << use); mask++) {
      long long ap = 1, bp = 1;
      for (int j = 0; j < use; j++) {
        if (mask & (1 << j)) {
          ap *= v[j];
          ap = min(MAXN, ap);
        } else {
          bp *= v[j];
          bp = min(MAXN, bp);
        }
      }
      if (ap * h >= a && bp * w >= b) mi = min(mi, use);
      vec[use].emplace_back(ap, bp);
    }
    sort(vec[use].begin(), vec[use].end());
    for (int i = vec[use].size() - 2; i >= 0; i--) {
      vec[use][i].second = max(vec[use][i + 1].second, vec[use][i].second);
    }
  }
  for (int use = 1; use <= n - f; use++) {
    for (int mask = 0; mask < (1 << use); mask++) {
      long long ap = 1, bp = 1;
      for (int j = 0; j < use; j++) {
        if (mask & (1 << j)) {
          ap *= v[j + f];
          ap = min(MAXN, ap);
        } else {
          bp *= v[j + f];
          bp = min(MAXN, bp);
        }
      }
      long long na = (a + (ap * h) - 1);
      na /= (ap * h);
      long long nb = (b + (bp * w) - 1);
      nb /= (bp * w);
      pair<long long, long long> need = {na, nb};
      for (int j = 0; j < 20; j++) {
        auto it = lower_bound(vec[j].begin(), vec[j].end(), need);
        if (it != vec[j].end() && (*it).second >= need.second)
          mi = min(mi, use + j);
      }
    }
  }
  if (mi > 34) mi = -1;
  cout << mi;
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int test = 1;
  for (int i = 1; i <= test; i++) sol();
}
