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