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

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