a,b,c,x,y = (int(i) for i in input().split()) 

ans = 5000 * 100000

for i in range(200001):
    tmp = i * c
    xx = int( x - i/2 + 0.5 )
    yy = int( y - i/2 + 0.5 )

    tmp += (xx > 0) * xx * a
    tmp += (yy > 0) * yy * b 

    if tmp < ans:
        ans = tmp

print(ans)