a,b,c,x,y = map(int,input().split())
cnt = 0
if 2*c < a+b:
    cnt += abs(x-y)*c*2
    if x > y:
        c += min((x-y)*a,(x-y)*2*c)
    else:
        c += min((y-x)*b,(y-x)*2*c)
else:
    cnt += a*x + b*y
print(cnt)