<?php
  fscanf(STDIN,"%d %d %d %d %d",$a,$b,$c,$x,$y);
  $a_and_b = $a+$b;
  $cost = 0;
  if($c*2 < $a_and_b){
    if($x > $y){
      if(($x-$y)*$a < ($x-$y)*$c){
        $cost += $c*($y*2);
        $cost += $a*($x-$y);
      }else{
        $cost += $c*($x*2);
      }
    }else{
      if(($y-$x)*$a < ($y-$x)*$c){
        $cost += $c*($x*2);
        $cost += $b*($y-$x);
      }else{
        $cost += $c*($y*2);
      }
    }
  }else{
    $cost += $x*$a;
    $cost += $y*$b;
  }
  echo $cost."\n";