#include <bits/stdc++.h>
using namespace std;
int c[100100];
int a, b, n, h, w;
int dfs(int a, int b, int h, int w, int p, int n) {
  if (a <= h && b <= w) 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 reth = h, retw = w;
    for (int j = 1; j <= i; ++j)
      if (1LL * reth * c[p] >= a)
        reth = a;
      else
        reth = reth * c[p];
    for (int j = 1; j <= cnt - i; ++j)
      if (1LL * retw * c[p] >= b)
        retw = b;
      else
        retw = retw * c[p];
    if (dfs(a, b, reth, retw, 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 -1;
}
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 = min(solve(a, b, h, w), solve(a, b, w, h));
  printf("%d\n", ans);
  return 0;
}
