#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int c[N];
int a, b, h, w, n;
int dfs(int A, int B, int a, int b, int p, int n) {
  if (A <= a && B <= b) return 1;
  if (p > n) return 0;
  int cnt = 1;
  for (int i = p; i < n; i++)
    if (c[i] == c[i + 1])
      cnt++;
    else
      break;
  for (int i = 0; i <= cnt; i++) {
    int aa = a, bb = b;
    for (int j = 1; j <= i; j++)
      if (1ll * aa * c[p] > A)
        aa = A;
      else
        aa = aa * c[p];
    for (int j = 1; j <= cnt - i; j++)
      if (1ll * bb * c[p] > B)
        bb = B;
      else
        bb = bb * c[p];
    if (dfs(A, B, aa, bb, cnt + p, n)) return 1;
  }
  return 0;
}
int solve(int A, int B, int h, int w) {
  for (int i = 0; i <= n; i++) {
    if (dfs(A, B, h, w, 1, i)) return i;
  }
  return 100;
}
int main() {
  scanf("%d%d%d%d%d", &a, &b, &h, &w, &n);
  for (int i = 1; i <= n; i++) scanf("%d", &c[i]);
  sort(c + 1, c + 1 + n);
  reverse(c + 1, c + 1 + n);
  n = min(n, 40);
  int ans = solve(a, b, h, w);
  ans = min(ans, solve(a, b, w, h));
  if (ans == 100)
    puts("-1");
  else
    printf("%d\n", ans);
  return 0;
}
