import sys # Defining constants pi = 3.141592653589793 inf = 2 * 1e9 linf = 4 * 1e18 mod1 = 1000000007 mod2 = 998244353 # Functions to find maximum or minimum def chmax(a, b): if a < b: return b, True return a, False def chmin(a, b): if a > b: return b, True return a, False def main(): # Reading input H, W, La, Lb, Ka, Kb = map(int, sys.stdin.readline().split()) ans = linf for i in range(1000001): if i == 0: if Kb > 0: ans = (H * W - 1) // Kb + 1 continue ok = 10**12 + 1 ng = -1 while ok - ng > 1: mid = (ok + ng) // 2 if min(H, i * La) * min(W, Lb * mid) + i * Ka + mid * Kb >= H * W: ok = mid else: ng = mid ans, _ = chmin(ans, i + ok) print(int(ans)) if __name__ == "__main__": main()