func solve(A: Int, B: Int, C: Int, X: Int, Y: Int) -> Int{
	let option1: Int = (A * X) + (B * Y)
	var option2 = 0
	if X > Y{
	   option2 = ((X - Y) * A) + (min(X, Y) * C * 2);
	} else if Y > X{
	   option2 = ((Y - X) * B) + (min(X, Y) * C * 2);
	} else {
	    option2 = (X * C * 2);
	}
	option2 = min(option2, max(X, Y) * C * 2)
	return min(option1, option2)
}

let abcxy = readLine(strippingNewline: true)!
var abcxya = abcxy.split(separator: " ").map{Int($0)}

var ans = solve(A: abcxya[0]!, B: abcxya[1]!, C: abcxya[2]!, X: abcxya[3]!,Y: abcxya[4]!)


print(ans)