#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using PII = pair<int, int>;
const int maxn = 1e5 + 10;
int ans = INT_MAX;
int n, a[maxn];
vector<PII> b;
int used[13];
int cur = 0;
int t;
void f(LL h, LL w, LL x, LL y, int p = 0) {
  if (cur >= ans || cur >= t) return;
  if (h >= x) {
    int cnt = 0;
    for (int i = 0; i < int(((int)(b).size())); ++i) {
      if (w >= y) break;
      for (int j = 0; j < int(b[i].second - used[i]); ++j) {
        w *= b[i].first;
        cnt++;
        if (w >= y) break;
      }
    }
    if (w >= y) {
      t = min(t, cnt + cur);
    }
    return;
  }
  if (p == ((int)(b).size())) return;
  used[p] = 0;
  f(h, w, x, y, p + 1);
  int tt = cur;
  for (int i = 0; i < int(b[p].second); ++i) {
    h *= b[p].first;
    cur++;
    used[p] = i + 1;
    f(h, w, x, y, p + 1);
    if (h >= x) break;
  }
  used[p] = 0;
  cur = tt;
}
int main() {
  int A, B, h, w;
  scanf("%d%d%d%d%d", &A, &B, &h, &w, &n);
  for (int i = 0; i < int(n); ++i) scanf("%d", &a[i]);
  sort(a, a + n, greater<int>());
  n = min(n, 34);
  map<int, int> m;
  for (int i = 0; i < int(n); ++i) m[a[i]]++;
  for (auto it : m) {
    b.push_back(it);
  }
  reverse(b.begin(), b.end());
  if (b.size() > 13) b.resize(13);
  t = INT_MAX;
  f(h, w, A, B);
  ans = min(ans, t);
  t = INT_MAX;
  f(h, w, B, A);
  ans = min(ans, t);
  printf("%d\n", ans == INT_MAX ? -1 : ans);
  return 0;
}
