#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, h, w, n;
  cin >> a >> b >> h >> w >> n;
  vector<int> v(n);
  if ((h >= a and w >= b) or (h >= b and w >= a)) {
    cout << 0 << '\n';
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
  }
  sort(v.rbegin(), v.rend());
  map<long long, bool> m;
  long long curr = 1;
  m[1] = true;
  for (int j = 0; j < min((int)v.size(), 100); ++j) {
    map<long long, bool> c;
    for (auto i : m) {
      if (i.first * v[j] < 1e16) {
        c[i.first * v[j]] = true;
      }
    }
    for (auto i : c) {
      m[i.first] = true;
    }
    long long temp = curr * v[j];
    if (curr != (temp / v[j])) {
      cout << j + 1 << '\n';
      return 0;
    }
    curr *= v[j];
    for (auto i : m) {
      if (i.first * h >= a) {
        if ((curr / i.first) * w >= b) {
          cout << j + 1 << '\n';
          return 0;
        }
      }
      if (i.first * w >= b) {
        if ((curr / i.first) * h >= a) {
          cout << j + 1 << '\n';
          return 0;
        }
      }
      if (i.first * w >= a) {
        if ((curr / i.first) * h >= b) {
          cout << j + 1 << '\n';
          return 0;
        }
      }
      if (i.first * h >= b) {
        if ((curr / i.first) * w >= a) {
          cout << j + 1 << '\n';
          return 0;
        }
      }
    }
  }
  cout << -1 << '\n';
}
