#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
long long int h, w;
int n;
int sz = 35;
long long int nums[N];
set<pair<long long int, long long int> > Set;
long long int get(long long int a, long long int b) {
  int d = 0;
  pair<long long int, long long int> cur =
      pair<long long int, long long int>(h, w);
  queue<pair<int, pair<long long int, long long int> > > q;
  q.push(pair<int, pair<long long int, long long int> >(d, cur));
  Set.clear();
  Set.insert(cur);
  while (!q.empty()) {
    pair<int, pair<long long int, long long int> > v = q.front();
    q.pop();
    d = v.first;
    cur = v.second;
    if (cur.first >= a && cur.second >= b) return d;
    if (cur.first >= b && cur.second >= a) return d;
    if (d >= sz) return N + 1;
    pair<long long int, long long int> A =
        pair<long long int, long long int>(cur.first * nums[d], cur.second);
    pair<long long int, long long int> B =
        pair<long long int, long long int>(cur.first, cur.second * nums[d]);
    if (cur.first < a && !Set.count(A)) {
      Set.insert(A);
      if (A.first >= a && A.second >= b) return d + 1;
      if (A.first >= b && A.second >= a) return d + 1;
      q.push(pair<int, pair<long long int, long long int> >(d + 1, A));
    }
    if (cur.second < b && !Set.count(B)) {
      Set.insert(B);
      if (B.first >= a && B.second >= b) return d + 1;
      if (B.first >= b && B.second >= a) return d + 1;
      q.push(pair<int, pair<long long int, long long int> >(d + 1, B));
    }
  }
  return N + 1;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long int a, b;
  cin >> a >> b >> h >> w >> n;
  for (int i = 0; i < n; i++) {
    cin >> nums[i];
  }
  sort(nums, nums + n);
  reverse(nums, nums + n);
  sz = min(sz, n);
  int ans = get(a, b);
  if (ans == N + 1) ans = -1;
  cout << ans << '\n';
  return 0;
}
