function Main(input) {
  	var A = parseInt(input.split(" ")[0]);
  var B = parseInt(input.split(" ")[1]);
  var C = parseInt(input.split(" ")[2]);
  var X = parseInt(input.split(" ")[3]);
  var Y = parseInt(input.split(" ")[4]);
  
  var getABcount = Math.min(X,Y) * 2;
  if(X > Y){
     console.log(Math.min((X - Y) * A + C * getABcount,A * X + B * Y));
  }else if(Y > X){
     console.log(Math.min((Y - X) * B + C * getABcount,A * X + B * Y));
  }else{
     console.log(Math.min(C * getABcount,A * X + B * Y));
  }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
