fun main(args:Array<String>) {
	val z = readLine()!!.split(" ").map{ it.toLong() }
	val (a,b,ab) = z.take(3)
	val (x,y) = z.takeLast(2)
	
	listOf(
			2*ab*max(x,y),
			2*ab*min(x,y) + a*(x-min(x,y)) + b*(y-min(x,y)),
			a*x + b*y
	).min().let {println(it)}
}