A, B, C, X, Y = map(int, input().split(' '))

if C * 2 <= A and C * 2 <= + B:
    print(max(X, Y) * 2 * C)
    exit()

if C * 2 >= A + B:
    print(A * X + B * Y)
    exit()

result = 0
while X > 0 and Y > 0:
    if C * 2 < A + B:
        result += C * 2
        X -= 1
        Y -= 1
        continue

if X == 0:
    print(result + Y * B)
else:
    print(result + X * A)
