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

a = A*X+B*Y

if 2*C < X:
    b = max(X,Y)*C*2
else:
    b = min(X, Y) * C * 2
    if X > Y:
        b += A * (X-Y)
    elif X < Y:
        b += B * (Y-X)


print(min(a, b))