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

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



main()