#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 D = k * l;
    D /= nl;
    cout << min(D, min((c * d), (p / np))) / n << endl;
  }
}
