# -*- coding: utf-8 -*-

a, b, c, x, y = map(int,input().split())

sum1 = 0
sum2 = 0

#iの場合
if x < y:
 sum1 = a*x + b*x
 yi = y - x
 sum1 += b*yi
else:
 sum1 = a*y + b*y
 xi = x - y
 sum1 += a*xi

#iiの場合
if x < y:
 sum2 = c*x*2
 yii = y - x
 sum2 += b*yii
else:
 sum2 = c*y*2
 xii = x - y
 sum2 += a*xii

if sum1 < sum2:
 print(sum1)
else:
 print(sum2)