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