package main

import (
	"fmt"
)

func main(){
	var a, b, c, x, y int
	fmt.Scan(&a, &b, &c, &x, &y)

	sum := map[int]int{}
	sum[0] = a*x + b*y
	sum[1] = 2*c*x + b*(x - y)
	sum[2] = 2*c*y + a*(y - x)
    sum[3] = 2*c*x + 2*c*(x - y)
	sum[4] = 2*c*y + 2*c*(y - x)

	ans := sum[0]
	for _, v := range sum {
		if ans > v {
			ans = v
		}
	}

	fmt.Print(ans)
}