// ABC095 - C
function main(input) {
  var inputs = input.split('\n');
  var line1 = inputs[0].split(' ').map(x => parseInt(x, 10));
  var a = line1[0];
  var b = line1[1];
  var ab = line1[2];
  var x = line1[3];
  var y = line1[4];

  var cost = 0;
  if (a + b > ab * 2) {
    cost += ab * 2 * Math.min(x, y);
    if (x > y) {
      cost += (x - y) * (a > ab * 2 ? ab * 2 : a);
    }
    if (y > x) {
      cost += (y - x) * (b > ab * 2 ? ab * 2 : b);
    }
  } else {
    cost += a * x + b * y;
  }
  console.log(cost);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
