#include <bits/stdc++.h>
using namespace std;
struct __timestamper {};
const int MAXN = 100100;
int dp[MAXN];
int smul(int a, int b, int c) { return (int)min(a * 1LL * b, (long long)c); }
int solve(int a, int b, int w, int h, vector<int> v) {
  if (a >= w && b >= h) return 0;
  memset(dp, -1, sizeof(dp));
  dp[min(a, w)] = min(b, h);
  for (int i = 0; i < (int)v.size(); i++) {
    int x = v[i];
    for (int j = w; j >= 1; j--) {
      if (dp[j] != -1) {
        int id = smul(j, x, w);
        dp[id] = max(dp[id], dp[j]);
        dp[j] = max(dp[j], smul(dp[j], x, h));
      }
    }
    if (dp[w] == h) return i + 1;
  }
  return (int)(v.size() + 1);
}
int main() {
  int a, b, w, h, n;
  while (scanf("%d%d%d%d%d", &a, &b, &w, &h, &n) == 5) {
    vector<int> v(n);
    for (int& x : v) scanf("%d", &x);
    sort(v.rbegin(), v.rend());
    int ans1 = solve(w, h, a, b, v);
    int ans2 = solve(h, w, a, b, v);
    int ans = min(ans1, ans2);
    if (ans > n) ans = -1;
    printf("%d\n", ans);
  }
  return 0;
}
