#include <bits/stdc++.h>
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c* x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug& operator<<(const c&) {
    return *this;
  }
};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  const int INF = 1e5;
  int A, B, H, W;
  cin >> A >> B >> H >> W;
  int n;
  cin >> n;
  vector<int> p(n);
  for (int i = 0; i < n; i++) {
    cin >> p[i];
  }
  sort(p.rbegin(), p.rend());
  n = min(n, 40);
  auto solve = [&](int a, int b, int h, int w) -> int {
    a = (a + h - 1) / h;
    b = (b + w - 1) / w;
    if (a == 1 && b == 1) return 0;
    vector<int> dp(a + 1);
    dp[1] = 1;
    for (int i = 0; i < n; i++) {
      for (int j = a; j > 0; j--) {
        int res = min((1LL) * j * p[i], (1LL) * a);
        dp[res] = min(b, max(dp[res], dp[j]));
        dp[j] = min((1LL) * b, (1LL) * dp[j] * p[i]);
      }
      if (dp[a] >= b) return i + 1;
    }
    return INF;
  };
  int res = min(solve(A, B, H, W), solve(A, B, W, H));
  if (res == INF) res = -1;
  cout << res << '\n';
  return 0;
}
