#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int LINF = 0x3f3f3f3f3f3f3f3f;
template <typename T, typename U>
inline void amin(T &x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
inline void amax(T &x, U y) {
  if (x < y) x = y;
}
int const N = 1e5 + 17;
int ext[N];
int dp[N];
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  int a, b, h, w, n;
  cin >> a >> b >> h >> w >> n;
  for (int i = 0; i < n; i++) cin >> ext[i];
  sort(ext, ext + n, greater<int>());
  n = min(n, 34);
  if (a > b) swap(a, b);
  dp[w] = h;
  for (int i = 0; i <= n; i++) {
    for (int j = N - 1; j > 0; j--) {
      if (!dp[j]) continue;
      if (a <= min(j, dp[j]) && b <= max(j, dp[j])) {
        cout << i;
        return 0;
      }
      if (i >= n) continue;
      int t = min(N - 1LL, 1LL * j * ext[i]);
      dp[t] = dp[j];
      dp[j] = min(N - 1LL, 1LL * dp[j] * ext[i]);
    }
  }
  cout << -1;
}
