l = input().split()
A = int(l[0])
B = int(l[1])
AB = int(l[2])
a = int(l[3])
b = int(l[4])

sum = 0

if A+B < AB*2:
    if a < b:
        sum += a*AB
        sum += b*B
    else:
        sum += b*AB
        sum += a*A
else:
    sum += a*A + b*B

print sum
