<?php
  fscanf(STDIN,"%d %d %d %d %d",$a,$b,$c,$x,$y);
  $iti = $c*2*max($x,$y);
  if($x>$y){
    $ni = ($c*2*min($x,$y))+(abs($x-$y)*$a);
  }else{
    $ni = ($c*2*min($x,$y))+(abs($x-$y)*$b)
  }
  $san = ($a*$x)+($b*$y);
  echo min($iti,$ni,$san)."\n";
  
