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