# coding: utf-8

# https://atcoder.jp/contests/abc095/tasks/arc096_a
# 16:32-16:44


def main():
    a, b, c, x, y = map(int, input().split())

    if y > x:
        a = b
        b = a
        x = y
        y = x
    # aの方が枚数（x)多い

    ans = 0
    if a+b > 2*c:
        ans += 2*c*y
        x -= y
        y = 0

        if a > 2*c:
            ans += 2*c*x
            x = 0
        else:
            ans += a*x
            x = 0
    else:
        ans += a*x + b*y

    return ans


print(main())
