#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, k, l, c, d, p, nl, np;
  double da, db, dc, ans;
  int aa, bb, cc;
  while (cin >> n >> k >> l >> c >> d >> p >> nl >> np) {
    da = k * l / nl;
    aa = floor(da);
    db = c * d;
    bb = floor(db);
    dc = p / np;
    cc = floor(dc);
    ans = min(min(aa, bb), cc);
    cout << floor(ans / n) << endl;
  }
  return 0;
}
