1n, k, l, c, d, p, nl, np = map(int, input().split())2 3cntG = (k * l) // (n * nl)4cntL = (c * d) // (n * 1)5cntS = p // (n * np)6 7print(min(cntG, cntL, cntS))