#include <bits/stdc++.h>
int main() {
  int n, k, l, c, d, p, nl, np;
  int a, b, f, t = 0;
  scanf("%d %d %d %d %d %d %d %d", &n, &k, &l, &c, &d, &p, &nl, &np);
  a = k * l;
  b = c * d;
  int g = a;
  f = p;
  while ((g = g - nl) >= 0) {
    b--;
    f = f - np;
    if (b >= 0 && f >= 0) {
      t++;
    } else
      break;
  }
  int y = (t / n);
  printf("%d", y);
  return 0;
}
