#include <bits/stdc++.h>
using namespace std;
const int maxN = 1e5 + 10;
long long N, A, B, H, W, C[maxN];
map<pair<long long, long long>, int> mapa;
queue<pair<long long, long long> > que;
void solve() {
  mapa[pair<long long, long long>(max(W, H), min(W, H))] = 0;
  que.push(pair<long long, long long>(max(W, H), min(W, H)));
  while (!que.empty()) {
    long long a = que.front().first, b = que.front().second;
    if (a >= A && b >= B) {
      cout << mapa[pair<long long, long long>(a, b)];
      return;
    }
    que.pop();
    if (mapa[pair<long long, long long>(a, b)] == N) continue;
    int x = C[mapa[pair<long long, long long>(a, b)] + 1];
    if (!mapa.count(pair<long long, long long>(a * x, b)) && a < A) {
      mapa[pair<long long, long long>(a * x, b)] =
          mapa[pair<long long, long long>(a, b)] + 1;
      que.push(pair<long long, long long>(a * x, b));
    }
    if (!mapa.count(pair<long long, long long>(a, b * x)) && b < B) {
      mapa[pair<long long, long long>(max(a, b * x), min(a, b * x))] =
          mapa[pair<long long, long long>(a, b)] + 1;
      que.push(pair<long long, long long>(max(a, b * x), min(a, b * x)));
    }
  }
  cout << -1;
}
int main() {
  cin >> A >> B >> H >> W >> N;
  if (A < B) swap(A, B);
  for (int i = 1; i <= N; i++) cin >> C[i];
  sort(C + 1, C + N + 1, greater<long long>());
  solve();
}
