#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
using namespace std;
int a, b, h, w, n, ans = 40;
int arr[200006];
void dfs(int a, int b, int ind) {
  if (a == 0 && b == 0) {
    ans = min(ans, ind);
    return;
  }
  if (ind == n) return;
  if (arr[ind] == 2) {
    while (a) {
      a /= 2, ++ind;
      if (ind == n && a) return;
    }
    while (b) {
      b /= 2, ++ind;
      if (ind == n && b) return;
    }
    ans = min(ans, ind);
    return;
  }
  if (a) dfs(a / arr[ind], b, ind + 1);
  if (b) dfs(a, b / arr[ind], ind + 1);
}
int main() {
  ios::sync_with_stdio(false);
  cin >> a >> b >> h >> w >> n;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + n);
  reverse(arr, arr + n);
  dfs((a + h - 1) / h - 1, (b + w - 1) / w - 1, 0);
  dfs((a + w - 1) / w - 1, (b + h - 1) / h - 1, 0);
  ans >= n + 1 ? ans = -1 : 0;
  cout << ans << endl;
  return 0;
}
