function Main(input) {
  input = input.trim();
  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 output = 1000000000000;
  for(var i = 0; i <= 100000; i++){
    output = Math.min(output, i * 2 * C +Math.max(0,X-i)*A + Math.max(0,Y-i)*B);
  }
  console.log(output);
}

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