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