function Main(input){
  var arr = input.split('\n');
  var abcxy = arr[0].split(' ').map(a=>Number(a));

  var A = abcxy[0];
  var B = abcxy[1];
  var C = abcxy[2];
  var X = abcxy[3];
  var Y = abcxy[4];
  var result = A*X+B*Y+C*X+C*Y;
  for(var a=0;a<=X;a++){
    var c = X-a;
    if(X>Y){
      var b = Y-c;
    }else{
      if(B>C){
        var c = Y;
        var b = 0;
      }else{
        var b = Y-c;
      }
    }
    if(b<0){
      b=0;
    }
    var tmp = a*A+b*B+c*C*2;
    if(tmp<result){
      result=tmp;
    }
  }
  console.log(result);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));