#include <bits/stdc++.h>
using namespace std;
void read(long long &x) {
  x = 0;
  long long f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -f;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 1) + (x << 3) + c - '0';
    c = getchar();
  }
  x *= f;
  return;
}
long long fs(long long x) { return x < 0 ? -x : x; }
void print(long long x) {
  if (x < 10) {
    putchar(x + '0');
    return;
  }
  print(x / 10);
  putchar(x % 10 + '0');
  return;
}
void write(long long x) {
  if (x < 0) {
    putchar('-');
    x = fs(x);
  }
  print(x);
  return;
}
long long mint(long long x, long long y) { return x < y ? x : y; }
long long maxt(long long x, long long y) { return x > y ? x : y; }
pair<long long, long long> r;
queue<pair<long long, long long> > q;
map<pair<long long, long long>, long long> vis;
bool cmp(long long a, long long b) { return a > b; }
long long n, a, b, h, w, ans = 0x3f3f3f3f, v[100005];
int main() {
  read(a), read(b), read(h), read(w), read(n);
  if (a > b) swap(a, b);
  for (int i = 1; i <= n; i++) read(v[i]);
  sort(v + 1, v + 1 + n, cmp);
  q.push(pair<long long, long long>(mint(h, w), maxt(h, w)));
  while (!q.empty()) {
    pair<long long, long long> p = q.front();
    q.pop();
    long long step = vis[p];
    if (p.first >= a && p.second >= b) {
      printf("%lld\n", step);
      return 0;
    }
    if (step == n) {
      continue;
    }
    r.first = p.first * v[step + 1];
    r.second = p.second;
    if (r.first > r.second) swap(r.first, r.second);
    if (vis[r] == 0) {
      vis[r] = step + 1;
      q.push(r);
    }
    r.first = p.first;
    r.second = p.second * v[step + 1];
    if (vis[r] == 0) {
      vis[r] = step + 1;
      q.push(r);
    }
  }
  puts("-1");
}
