#include <bits/stdc++.h>
using namespace std;
const int MAX = 100005;
long long arr[MAX];
long long a, b, h, w, n;
map<pair<long long, long long>, int> memo[MAX];
int solve(long long x, long long y, int idx) {
  if (x >= a && y >= b) return 0;
  if (idx == n || arr[idx] <= 1) {
    return n + 1;
  }
  if (memo[idx].count(make_pair(x, y))) return memo[idx][make_pair(x, y)];
  int &ans = memo[idx][{x, y}] = n + 1;
  if (x < a) {
    ans = min(ans, 1 + solve(x * arr[idx], y, idx + 1));
  }
  if (y < b) {
    ans = min(ans, 1 + solve(x, y * arr[idx], idx + 1));
  }
  return ans;
}
bool cmp(long long x, long long y) { return x > y; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> a >> b >> h >> w >> n;
  if (a > b) swap(a, b);
  if (h < w) swap(h, w);
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n, cmp);
  int ans = min(solve(w, h, 0), solve(h, w, 0));
  if (ans > n) ans = -1;
  cout << ans << endl;
  return 0;
}
