#include <bits/stdc++.h>
using namespace std;
ifstream in("test.in");
ofstream out("test.out");
int n, hh, ww, aa, bb;
vector<int> vv;
int dp[2][100004];
inline int getVal(int pp1, int pp2, int lim) {
  long long rez = 1LL * pp1 * pp2;
  if (rez >= lim) rez = lim;
  return rez;
}
int getDp(int aa, int bb) {
  memset(dp, 0, 2 * 100004 * sizeof(int));
  dp[0][getVal(1, hh, aa)] = getVal(1, ww, bb);
  for (int lev = 1; lev <= n; lev++) {
    memset(dp[lev & 1], 0, sizeof(int) * (aa + 2));
    for (int i = 1; i <= aa; i++) {
      int val1 = getVal(i, vv[lev], aa);
      int val2 = getVal(dp[(lev + 1) & 1][i], vv[lev], bb);
      dp[lev & 1][val1] = max(dp[lev & 1][val1], dp[(lev + 1) & 1][i]);
      dp[lev & 1][i] = max(dp[lev & 1][i], val2);
    }
    if (dp[lev & 1][aa] >= bb) {
      return lev;
    }
  }
  return -1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> aa >> bb >> hh >> ww >> n;
  if ((hh >= aa && ww >= bb) || (ww >= aa && hh >= bb)) {
    cout << "0\n";
    return 0;
  }
  vv.resize(n + 1);
  for (int i = 1; i <= n; i++) cin >> vv[i];
  sort(vv.rbegin(), vv.rbegin() + n);
  int v1 = getDp(aa, bb), v2 = getDp(bb, aa);
  if (v1 == -1 && v2 == -1) {
    cout << "-1\n";
  } else if (v1 == -1 || v2 == -1) {
    cout << max(v1, v2) << "\n";
  } else
    cout << min(v1, v2) << "\n";
  return 0;
}
