package main

import "fmt"

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

	if a+b <= c*2 {
		fmt.Println(a*x + b*y)
	} else if c*2 <= a && c*2 <= b {
		n := max(x, y)
		fmt.Println(c * 2 * n)
	} else {
		n := min(x, y)
		ans := (c * 2 * n) + (x-n)*a + (y-n)*b
		fmt.Println(ans)
	}
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}
