function Main(input) {
  input = input.trim().split(" ");
  var A = parseInt(input[0], 10);
  var B = parseInt(input[1], 10);
  var C = parseInt(input[2], 10);
  var X = parseInt(input[3], 10);
  var Y = parseInt(input[4], 10);
  var roop = Math.max(X, Y);
  var ans = Infinity;
  var total = 0;
  for (var i = 0; i <= roop; i++) {
    var xa = 0;
    var yb = 0;
    if (i < X) {
      xa = X - i;
    }
    if (i < Y) {
      yb = Y - i;
    }
    total = 2 * i * C + A * xa + B * yb;
    ans = Math.min(ans, total);
    total = 0;
  }
  console.log(ans);
}

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