#include <bits/stdc++.h>
using namespace std;
int a, b, h, w, n, l[100001], ans = INT_MAX;
void solve(int x, int y, int cnt) {
  if (!x && !y) {
    ans = min(ans, cnt);
    return;
  }
  if (cnt == n) return;
  if (l[cnt] == 2) {
    while (x) x /= 2, ++cnt;
    while (y) y /= 2, ++cnt;
    ans = min(ans, cnt);
    return;
  }
  if (x) solve(x / l[cnt], y, cnt + 1);
  if (y) solve(x, y / l[cnt], cnt + 1);
}
int main() {
  cin >> a >> b >> h >> w >> n;
  for (int i = 0; i < n; ++i) cin >> l[i];
  sort(l, l + n, greater<int>());
  solve((a - 1) / h, (b - 1) / w, 0);
  solve((a - 1) / w, (b - 1) / h, 0);
  if (ans >= n + 1) ans = -1;
  cout << ans;
}
