#include <bits/stdc++.h>
using namespace std;
const int Max = 2e5;
long long a, b, h, w;
int n;
long long A[110001];
map<pair<long long, long long>, int> dp[50];
int cnt = 0;
int d__p(int i, long long s1, long long s2) {
  if (s1 >= h && s2 >= w) {
    return dp[i][{s1, s2}] = 0;
  }
  if (i == cnt + 1) return dp[i][{s1, s2}] = 1e9;
  int &res = dp[i][{s1, s2}];
  if (res != 0) return res;
  res = 1e9;
  if (s1 < h) res = min(res, d__p(i + 1, s1 * A[i], s2) + 1);
  if (s2 < w) res = min(res, d__p(i + 1, s1, s2 * A[i]) + 1);
  return res;
}
int main() {
  cin >> h >> w >> a >> b >> n;
  if (a >= w && b >= h) {
    cout << 0;
    return 0;
  }
  if (a >= h && b >= w) {
    cout << 0;
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    cin >> A[i];
  }
  sort(A + 1, A + n + 1, greater<long long>());
  cnt = min(n, 34);
  int res = min(d__p(1, a, b), d__p(1, b, a));
  if (res >= 1e9) res = -1;
  cout << res;
  return 0;
}
