a,b,c,x,y = map(int, input().split())
if (a + b <= 2*c):
    print(a*x + b*y)
elif a > 2*c and b > 2*c:
    print(max(x,y)*2*c)
elif a > 2*c:
    if x >= y:
        print(x*2*c)
    else:
        print(x*2*c + (y-x)*b)
elif b > 2*c:
    if y >= x:
        print(y*2*c)
    else:
        print(y*2*c  + (x - y)*b)
else:
    tmp = min(x,y)
    print(tmp*2*c + a*(x-tmp) + b*(y-tmp))