a, b, c, x, y = map(int, input().split())
ans = 10000000
for i in range(min(x, y) + 1):
    nc = 2 * i * c
    na = max(0, (a * (x - i)))
    nb = max(0, (b * (y - i)))
    ans = min(ans, nc + na + nb)
print(ans)