#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int piz = min(x, y), mon = 0;
  if (a + b > c * 2) {
    mon = c * piz * 2;
  } else {
    mon = (a + b) * piz;
  }
  if (piz == x) {
    piz = y - x;
    if (a > c * 2)
      mon += c * 2 * piz;
    else
      mon += a * piz;
  } else {
    piz = x - y;
    if (b > c * 2)
      mon += c * 2 * piz;
    else
      mon += a * piz;
  }
  cout << mon << endl;
  return 0;
}
