package main

import "fmt"

var A, B, C, X, Y int

func main() {
	fmt.Scanf("%d %d %d %d %d", &A, &B, &C, &X, &Y)

	ans := 0
	if A/2+B/2 > C {
		m := Min(X, Y)
		ans += m * 2 * C
		X -= m
		Y -= m
	}

	ans += Min(A*X, C*2*X)
	ans += Min(B*Y, C*2*Y)

	fmt.Println(ans)
}

func Min(x, y int) int {
	if x > y {
		return y
	}
	return x
}
