(define a(read))
(define b(read))
(define c(*(read)2))
(define x(read))
(define y(read))
(print
	(min
		(+(* a x)(* b y))
		(+(* c x)(* b y))
		(+(* a x)(* c y))
		(*(max x y)c)
		(+(min x y)(*(abs(- x y))(if(< x y)b a)))
	)
)