a, b, c, x, y = map(int, input().split())
if min(a, b, c) == c:
    print(c * 2 * max(x, y))
    # print("1")
elif (a + b) / 2 >= c:
    if x >= y:
        print(c * 2 * y + a * (x - y))
        # print("2-1")
    else:
        print(c * 2 * x + b * (y - x))
        # print("2-2")
else:
    print(a * x + b * y)
    # print("3")