a, b, c, x, y = gets.split.map &:to_i

cases = []

# A B
cases << a*x + b*y
# A C
cases << a*x + c*2*y
# C
cases << c*[x, y].max*2

# C AB
k = ([x, y].min+1)/2
i = [0, x-k].max
j = [0, y-k].max
cases << a*i + b*j + c*k*2

p cases.min