def resolve():
    a, b, c, x, y = map(int, input().split())
    ans = 0
    if a+b > 2*c:
        com = min(x, y)
        ans += 2*c*com
        if 2*c <= a or 2*c <= b:
            ans += max(x-com, y-com)*2*c
        else:
            ans += a*(x-com) + b*(y-com)
    else:
        ans += a*x + b*y

    print(ans)

if __name__ == '__main__':
    resolve()