#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, l, c, d, p, nl, np;
  cin >> n >> k >> l >> c >> d >> p >> nl >> np;
  int mls = k * l;
  int slices = c * d;
  int drinks = min(mls / nl, min(p / np, slices)) / n;
  cout << drinks << endl;
}
