a, b, c, x, y = map(int, input().split())
xy = [x, y]

if (a + b) // 2 <= c:
    total_ab = a * x + b * y
    print(total_ab)
else:
    d = c * min(xy) * 2
    if x == y:
        print(d)
    elif x > y:
        print(min((x-y) * a + d, c * max(xy) * 2))
    else:
        print(min((y-x) * b + d, c * max(xy) * 2))