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

if c<a/2 and c<b/2:
    print(c*max(x,y)*2)
elif (a+b)/2 < c:
    print(a*x + b*y)
else:
    if x<y:
        print(c*2*x + b*(y-x))
    else:
        print(c*2*y + a*(x-y))
