package main

import (
	"fmt"
)

func main() {
	var a, b, c, x, y int
	fmt.Scanf("%d %d %d %d %d", &a, &b, &c, &x, &y)
	sum := (a * x) + (b * y)
	if x == y {
		tmp := (c * x * 2)
		if sum > tmp {
			sum = tmp
		}
	} else {
		diff := x - y
		v1 := 0
		v2 := 0
		if diff > 0 {
			v1 = (c * (x * 2))
			v2 = (c * (y * 2)) + (a * diff)
		} else {
			v1 = (c * (y * 2))
			v2 = (c * (x * 2)) + (b * diff)
		}
		if sum > v1 {
			sum = v1
		} else if sum > v2 {
			sum = v2
		}
	}
	fmt.Println(sum)
}
