#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1, -1, -1, 0, 1, -1, 0, 1};
int kx8[] = {1, 1, 2, 2, -1, -1, -2, -2};
int ky8[] = {2, -2, 1, -1, 2, -2, 1, -1};
map<int, int> dp[35][100005];
long long a, b, h, w, n, ar[100005];
long long dpcall(int id, long long x, long long y) {
  if (a <= x && b <= y) return 0;
  if (id == n) return 100;
  if (dp[id][x].count(y)) return dp[id][x][y];
  long long ret = 100;
  if (x < a) ret = min(ret, 1 + dpcall(id + 1, min(100001LL, ar[id] * x), y));
  if (y < b) ret = min(ret, 1 + dpcall(id + 1, x, min(100001LL, ar[id] * y)));
  dp[id][x][y] = ret;
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> a >> b >> h >> w >> n;
  for (int i = 0; i < (n); i++) cin >> ar[i];
  sort(ar, ar + n);
  reverse(ar, ar + n);
  n = min(34LL, n);
  long long ret = dpcall(0, h, w);
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= 100001; j++) dp[i][j].clear();
  }
  swap(a, b);
  ret = min(ret, dpcall(0, h, w));
  if (ret > 50) ret = -1;
  cout << ret << endl;
  return 0;
}
