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

if a+b > c*2:
    if x == y:
        print(c*2*x)
    elif x > y:
        print(a*(x-y) + c*2*y)
    elif x < y:
        print(b*(y-x) + c*2*x)
else:
    print(a*x + b*y)