def main():

    a, b, c, x, y = (int(i) for i in input().split())

    ans = a*x + b*y

    cur = 2*c*min(x, y) + (a*(x-y) if x > y else b*(y-x))

    ans = min(ans, cur)

    cur = 2*c*max(x, y)

    ans = min(ans, cur)

    print(ans)





if __name__ == '__main__':

    main()

def main():

    a, b, c, x, y = (int(i) for i in input().split())

    ans = a*x + b*y

    ans = min(ans, 2*c*max(x, y))

    if x < y:

        d = y-x

        d *= b

    else:

        d = x-y

        d *= a

    ans = min(ans, 2*c*min(x, y) + d)

    print(ans)





if __name__ == '__main__':

    main()

def main():
    a, b, c, x, y = (int(i) for i in input().split())
    ans = a * x + b * y
    cur = 2 * c * min(x, y) + (a * (x - y) if x > y else b * (y - x))
    ans = min(ans, cur)
    cur = 2 * c * max(x, y)
    ans = min(ans, cur)
    print(ans)


if __name__ == "__main__":
    main()

def main():
    a, b, c, x, y = (int(i) for i in input().split())
    ans = a * x + b * y
    ans = min(ans, 2 * c * max(x, y))
    if x < y:
        d = y - x
        d *= b
    else:
        d = x - y
        d *= a
    ans = min(ans, 2 * c * min(x, y) + d)
    print(ans)


if __name__ == "__main__":
    main()

-    cur = 2 * c * min(x, y) + (a * (x - y) if x > y else b * (y - x)) -    ans = min(ans, cur) -    cur = 2 * c * max(x, y) -    ans = min(ans, cur) +    ans = min(ans, 2 * c * max(x, y)) +    if x < y: +        d = y - x +        d *= b +    else: +        d = x - y +        d *= a +    ans = min(ans, 2 * c * min(x, y) + d)