'use strict'

const Main = (input) => {
  const tmp = input.trim().split(' ')
  const A = parseInt(tmp[0])
  const B = parseInt(tmp[1])
  const C = parseInt(tmp[2])
  const X = parseInt(tmp[3])
  const Y = parseInt(tmp[4])

  const resultArr = []

  resultArr.push(A * X + B * Y)
  resultArr.push(Math.max(X, Y) * C * 2)

  const minC = Math.min(X, Y) * C * 2
  if (X > Y) {
    resultArr.push(minC + (X - Y) * A)
  } else {
    resultArr.push(minC + (Y - X) * B)
  }

  const result = Math.min.apply(null, resultArr)
  console.log(result)
  return result
}

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