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())

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

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

    v3 = a*x + b*y

    print((min(v1, v2, v3)))





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())
    v1 = 2 * c * max(x, y)
    v2 = 2 * c * min(x, y) + (y - x if x < y else x - y) * (b if x < y else a)
    v3 = a * x + b * y
    print((min(v1, v2, v3)))


if __name__ == "__main__":
    main()

-    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) +    v1 = 2 * c * max(x, y) +    v2 = 2 * c * min(x, y) + (y - x if x < y else x - y) * (b if x < y else a) +    v3 = a * x + b * y +    print((min(v1, v2, v3)))