n,k,l,c,d,p,nl,np = list(map(int, input().split())) md = k*l t1 = md//nl t2 = c*d t3 = p//np t4 = min(t1,t2,t3) print(t4//n)