#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
int mox[8] = {1, 0, 0, -1, 1, -1, 1, -1};
int moy[8] = {0, -1, 1, 0, -1, -1, 1, 1};
char mover[4] = {'D', 'L', 'R', 'U'};
const long long INF = 1LL << 61;
const int inf = 2e9;
const long double PI = acos(-1.0);
const long double EPS = 1e-9;
bool debug;
using namespace std;
void solve();
int main() {
  debug = 0;
  cout.precision(30);
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  srand((unsigned)time(NULL));
  solve();
  if (debug)
    cout << '\n'
         << '\n'
         << "time: " << clock() * 1.0 / CLOCKS_PER_SEC * 1000 << " ms" << '\n';
}
const int N = 100005;
const int MAGIC = 420;
double la[N];
int all[N], n, h, a, w, b;
vector<pair<double, double> > q;
bool check(int len, int a, int b) {
  double needH = log(a / h + (a % h != 0));
  double needW = log(b / w + (b % w != 0));
  int n1 = len / 2;
  int n2 = len - n1;
  q.clear();
  for (int mask = 0; mask < (1 << n1); mask++) {
    double H = 0, W = 0;
    for (int j = 0; j < n1; j++) {
      if (mask & (1 << j))
        H += la[j];
      else
        W += la[j];
    }
    q.push_back({H, W});
  }
  sort(q.begin(), q.end());
  for (int i = (int)q.size() - 2; i >= 0; i--)
    q[i].second = max(q[i].second, q[i + 1].second);
  for (int mask = 0; mask < (1 << n2); mask++) {
    double H = 0, W = 0;
    for (int j = 0; j < n2; j++) {
      if (mask & (1 << j))
        H += la[j + n1];
      else
        W += la[j + n1];
    }
    double ostH = needH - H;
    double ostW = needW - W;
    pair<double, double> tmp = {ostH - EPS, -1.0};
    auto it = lower_bound(q.begin(), q.end(), tmp);
    if (it != q.end() && it->second >= ostW - EPS) return 1;
  }
  return 0;
}
void solve() {
  scanf("%d%d%d%d%d", &a, &b, &h, &w, &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &all[i]);
  }
  sort(all, all + n);
  reverse(all, all + n);
  n = min(n, 40);
  for (int i = 0; i < n; i++) la[i] = log(all[i]);
  if (h >= a && w >= b) return void(cout << 0 << '\n');
  if (h >= b && w >= a) return void(cout << 0 << '\n');
  for (int i = 0; i <= 1; i++) {
    if (h >= a && w * all[0] >= b) return void(cout << 1 << '\n');
    if (h * all[0] >= a && w >= b) return void(cout << 1 << '\n');
    swap(a, b);
  }
  int le = 1, ri = n;
  if (!check(n, a, b) && !check(n, b, a)) return void(cout << -1 << '\n');
  while (ri - le > 1) {
    int mid = (le + ri) >> 1;
    if (!check(mid, a, b) && !check(mid, b, a))
      le = mid;
    else
      ri = mid;
  }
  cout << ri << '\n';
}
