#include <bits/stdc++.h>
using namespace std;
bool is_square(int n) {
  for (int i = 0; i <= n; i++) {
    if (i * i == n) {
      return true;
    }
  }
  return false;
}
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (c * 2 <= a && c * 2 <= b) {
    cout << 2 * c * max(x, y) << endl;
  } else if (a + b <= c * 2) {
    cout << a * x + b * y << endl;
  } else {
    int n = min(x, y);
    cout << n * c * 2 + (x - n) * a + (y - n) * b << endl;
  }
  return 0;
}
