<?php
  fscanf(STDIN,"%d %d %d %d %d",$A,$B,$C,$X,$Y);
	if($X>$Y){
    	$S1=$A*($X-$Y)+$C*2*$Y;
      	$S2=$A*$X+$B*$Y;
    }
	else{
    	$S1=$B*($Y-$X)+$C*2*$X;
      	$S2=$A*$X+$B*$Y;
    }
  echo min($S1,$S2)
  ?>