'use strict';
console.log(function(args){
  const tmp = args.trim().split(' ').map(a=>a|0);
  const A = tmp[0], B = tmp[1], C = tmp[2];
  let X = tmp[3], Y = tmp[4];
  let total = 0;
  if ( A > 2*C ) {
    total += X * 2*C;
    Y = Math.max( 0, Y-X );
    X = 0;
  }
  if ( B > 2*C ) {
    total += Y * 2*C;
    X = Math.max( 0, X-Y );
    Y = 0;
  }
  let subtotal = Infinity;
  for ( let x = 0; x <= X; x++ ) {
    for ( let y = 0; y <= Y; y++ ) {
      const sum = A*x + B*y + C*Math.max(X-x,Y-y)*2;
      if ( sum < subtotal ) subtotal = sum;
    }
  }
  total += subtotal;
  return total.toString();
}(require('fs').readFileSync('/dev/stdin', 'utf8')));
