#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100010, INF = 1000000;
long long A, B, H, W, N;
long long E[MAX_N];
int solve_rec(int i) {
  if (H >= A && W >= B) return i;
  if (i >= N) return INF;
  if (E[i] == 2) {
    int x = 0, y = 0;
    while (H * (long long)(1 << x) < A) ++x;
    while (W * (long long)(1 << y) < B) ++y;
    if (i + x + y > N) return INF;
    return i + x + y;
  }
  int tmp_ans = INF;
  if (H < A) {
    H *= E[i];
    tmp_ans = min(tmp_ans, solve_rec(i + 1));
    H /= E[i];
  }
  if (W < B) {
    W *= E[i];
    tmp_ans = min(tmp_ans, solve_rec(i + 1));
    W /= E[i];
  }
  return tmp_ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> A >> B >> H >> W >> N;
  for (int i = 0; i < N; i++) cin >> E[i];
  sort(E, E + N);
  reverse(E, E + N);
  int ans = solve_rec(0);
  swap(A, B);
  ans = min(ans, solve_rec(0));
  if (ans == INF) ans = -1;
  cout << ans << "\n";
  return 0;
}
