#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:167177216")
using namespace std;
const long long MOD = 1000000000 + 7;
map<long long, pair<int, long long>> M1[41];
map<long long, pair<int, long long>> pth1[41];
map<long long, pair<int, long long>> M2[41];
map<long long, pair<int, long long>> pth2[41];
pair<int, long long> rec(int pos, long long left, long long need_l,
                         vector<long long> &arr,
                         map<long long, pair<int, long long>> *M,
                         map<long long, pair<int, long long>> *pth) {
  if (M[pos].count(left)) {
    return M[pos][left];
  }
  if (left >= need_l) {
    return M[pos][left] = make_pair(0, left - need_l);
  }
  if (pos == arr.size()) {
    return M[pos][left] = make_pair(999999, 0);
  }
  pair<int, long long> result = make_pair(999999, 0);
  pair<int, long long> pthres;
  auto tmp = rec(pos + 1, left * arr[pos], need_l, arr, M, pth);
  tmp.first++;
  if (tmp.first < result.first) {
    result = tmp;
    pthres = make_pair(pos + 1, left * arr[pos]);
  } else {
    if (tmp.first == result.first) {
      if (tmp.second < result.second) {
        result = tmp;
        pthres = make_pair(pos + 1, left * arr[pos]);
      }
    }
  }
  tmp = rec(pos + 1, left, need_l, arr, M, pth);
  if (tmp.first < result.first) {
    result = tmp;
    pthres = make_pair(pos + 1, left);
  } else {
    if (tmp.first == result.first) {
      if (tmp.second < result.second) {
        result = tmp;
        pthres = make_pair(pos + 1, left);
      }
    }
  }
  pth[pos][left] = pthres;
  return M[pos][left] = result;
}
int get_ans(int w, int h, vector<long long> &tt) {
  for (int i = 0; i < 41; ++i) M1[i].clear(), pth1[i].clear();
  pair<int, long long> result = make_pair(999999, 0);
  result = rec(0, 1, w, tt, M1, pth1);
  long long another = h;
  pair<int, long long> pstart = make_pair(0, 1);
  map<long long, pair<int, long long>> *m_res = M1, *pth_res = pth1;
  set<int> idx;
  while (true) {
    if (!pth_res[pstart.first].count(pstart.second)) break;
    auto nxt = pth_res[pstart.first][pstart.second];
    if (pstart.second != nxt.second) {
      idx.insert(pstart.first);
    }
    pstart = nxt;
  }
  long long sum = 1;
  int ans = result.first;
  if (sum < another) {
    for (int i = tt.size() - 1; i >= 0; --i) {
      if (idx.count(i)) continue;
      sum *= tt[i];
      ans++;
      if (sum >= another) break;
    }
  }
  if (another > sum || result.first > 9999) {
    return 9999;
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  int a, b, h, w, n;
  cin >> a >> b >> h >> w >> n;
  vector<int> arr(n);
  for (int(i) = 0; (i) < n; (i)++) cin >> arr[i];
  sort((arr).begin(), (arr).end());
  vector<long long> tt;
  for (int i = arr.size() - 1; i >= max(0, (int)arr.size() - 1 - 39); --i) {
    tt.push_back(arr[i]);
  }
  sort((tt).begin(), (tt).end());
  int ans = 9999;
  ans = min(ans, get_ans((a - 1) / w + 1, (b - 1) / h + 1, tt));
  ans = min(ans, get_ans((b - 1) / w + 1, (a - 1) / h + 1, tt));
  if (ans == 9999) ans = -1;
  cout << ans;
  return 0;
}
