#include <bits/stdc++.h>
using namespace std;
const long long int INF = 1e18;
const int inf = 1e9;
const int MOD = 1e9 + 7;
const int nax = 1000000 + 10;
long long int a, b, n, ans;
long long int arr[nax];
void solve(long long int h, long long int w, long long int i) {
  if (h > w) swap(h, w);
  if (h >= a && w >= b) {
    ans = min(ans, i - 1);
    return;
  }
  if (i == n + 1) return;
  if (arr[i] == 2) {
    if (h < a)
      solve(h * arr[i], w, i + 1);
    else
      solve(h, w * arr[i], i + 1);
    return;
  }
  if (h < a) solve(h * arr[i], w, i + 1);
  if (w < b) solve(h, w * arr[i], i + 1);
}
int main() {
  ios::sync_with_stdio(0);
  long long int h, w;
  cin >> a >> b >> h >> w >> n;
  if (a > b) swap(a, b);
  if (h > w) swap(h, w);
  for (int i = 1; i <= n; i++) cin >> arr[i];
  sort(arr + 1, arr + n + 1, greater<long long int>());
  n = min(40LL, n);
  ans = inf;
  solve(h, w, 1);
  if (ans == inf)
    cout << -1;
  else
    cout << ans;
  return 0;
}
