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

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

    print(ans)