a, b, c, x, y = map(int, input().split())
if c <= (a/2) and c <= (b/2):
    print(c*max(x, y)*2)
elif c <= (a + b) / 2:
    if x <= y:
        print(c*x*2+b*(y-x))
    else:
        print(c*y*2+a*(x-y))
else:
    print(a*x+b*y)