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

if A + B > C:
    print(max(A, B) * C)
else:

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

        else:
            if X > Y:
                print(C*Y * 2 + (X - Y) * A)

            else:
                print(C*X * 2 + (Y - X) * B)

    else:
        print(X*A + Y*B)
