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

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

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

    else:
        C_num = min(X, Y)
        if X > Y:
            print(C_num*2*C + A*(X-C_num))
        else:
            print(C_num*2*C + B*(Y-C_num))
