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