#include <bits/stdc++.h>
using namespace std;
int A[100000];
set<pair<unsigned long long, unsigned long long> > DP;
int dfs(int i, unsigned long long h, unsigned long long w, const int& a,
        const int& b) {
  static int min = 35;
  if (DP.find(pair<unsigned long long, unsigned long long>(h, w)) == DP.end())
    DP.insert(pair<unsigned long long, unsigned long long>(h, w));
  else
    return min;
  if (i == min) return min;
  if (a <= h && b <= w) {
    min = i;
    return min;
  }
  if (a > h) dfs(i + 1, h * A[i], w, a, b);
  if (b > w) dfs(i + 1, h, w * A[i], a, b);
  return min;
}
int main() {
  int a, b, h, w, n;
  priority_queue<int> q;
  cin >> a >> b >> h >> w >> n;
  for (int i = 0; i < n; i++) {
    scanf("%d", &A[i]);
    if (q.size() < 34)
      q.push(-A[i]);
    else if (-q.top() < A[i]) {
      q.pop();
      q.push(-A[i]);
    }
  }
  sort(A, A + n);
  if (n > 34) n = 34;
  unsigned long long Size = (unsigned long long)a * b;
  unsigned long long size = (unsigned long long)h * w;
  for (int i = n - 1; i >= 0; i--) {
    A[i] = -q.top();
    q.pop();
    if (size < Size) size *= A[i];
  }
  if (size < Size) {
    cout << -1 << endl;
    return 0;
  }
  if (a <= h && b <= w) {
    cout << 0;
    return 0;
  }
  dfs(0, h, w, a, b);
  int ans = dfs(0, w, h, a, b);
  cout << (ans == 35 ? -1 : ans);
}
