#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, k, l, np, nl, c, d, p, ta, tc, tb;
  cin >> n >> k >> l >> c >> d >> p >> nl >> np;
  ta = (k * l) / nl;
  tb = c * d;
  tc = p / np;
  cout << (int)((min(min(ta, tb), tc)) / n);
  return 0;
}
