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

if A > C and B > C:
    print(C*max(X, Y))

else:
    if C <= A + B:
        if X > Y:
            print(Y * C + abs(X-Y) * A)

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

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