#include <bits/stdc++.h>
using namespace std;
vector<long long> data;
long long a, b, h, w, n, t, minVal;
inline void swap(int &a, int &b) {
  int tmp = a;
  a = b;
  b = tmp;
}
inline int mini(int a, int b) { return a < b ? a : b; }
bool cmp(long long a, long long b) { return a > b; }
int dfs(int crt, long long th, long long tw) {
  if (th >= a && tw >= b || th >= b && tw >= a) return crt;
  if (crt >= 34 || crt >= data.size()) return -1;
  if (data[crt] == minVal) {
    while (th < a) {
      th *= minVal;
      crt++;
    }
    while (tw < b) {
      tw *= minVal;
      crt++;
    }
    return crt <= data.size() ? crt : -1;
  } else {
    int reta = 0, retb = 0;
    if (th < 100000) reta = dfs(crt + 1, th * data[crt], tw);
    if (tw < 100000) retb = dfs(crt + 1, th, tw * data[crt]);
    if (reta <= 0 && retb <= 0) return -1;
    if (reta <= 0) return retb;
    if (retb <= 0) return reta;
    return mini(reta, retb);
  }
}
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> a >> b >> h >> w >> n;
  if (a > b) swap(a, b);
  if (h > w) swap(h, w);
  if (h >= a && w >= b) {
    printf("0\n");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    cin >> t;
    data.push_back(t);
  }
  sort(data.begin(), data.end(), cmp);
  minVal = data[mini(33, data.size() - 1)];
  printf("%d\n", mini(dfs(0, h, w), dfs(0, w, h)));
  return 0;
}
