#include <bits/stdc++.h>
using namespace std;
inline int min(int x, int y) {
  if (x < y) return x;
  return y;
}
int main() {
  int n, l, j, d, p, k, c, nl, np;
  while (scanf("%d%d%d%d%d%d%d%d", &n, &k, &l, &c, &d, &p, &nl, &np) != EOF) {
    int x = (k * l) / nl;
    int y = (c * d);
    int z = p / np;
    printf("%d\n", (min(min(x, y), z) / n));
  }
  return 0;
}
