function Main(s) {
  var s = s.split("\n")[0].split(" ").map(e => Number(e));
  var x = s[3], y = s[4];
  var c = s[3] < s[4] ? s[4] * 2:s[3] * 2;
  var sum;
  var min = 10000000001;
  for (var i = 0; i < c; i += 2) {
    sum = s[0] * x + s[1] * y + s[2] * i;
    min = sum < min ? sum:min;
    x--,y--;
  }
  console.log(min);
}

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