'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+B > 2*C ) {
    let Z = Math.min(X,Y);
    total += Z*2*C;
    X = X - Z; Y = Y - Z;
  }
  if ( ( X > 0 && A > 2*C ) || ( Y > 0 && B > 2*C ) ) {
    total += X*2*C;
    total += Y*2*C;
  } else {
    total += X*A;
    total += Y*B;
  }
  return total.toString();
}(require('fs').readFileSync('/dev/stdin', 'utf8')));
