#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (a > b) {
    swap(a, b);
    swap(x, y);
  }
  int mn = min(x, y);
  if (2 * c <= a) {
    cout << max(x, y) * 2 * c << endl;
  } else if (c <= a) {
    int rest = (x - mn) * a + (y - mn) * b;
    cout << 2 * mn * c + rest << endl;
  } else if (c >= b) {
    cout << x * a + y * b << endl;
  } else if (2 * c <= b) {
    int rest = max(x - y, 0) * a;
    cout << y * 2 * c + rest << endl;
  } else if (2 * c <= (a + b)) {
    int rest = (x - mn) * a + (y - mn) * b;
    cout << mn * 2 * c + rest << endl;
  } else {
    cout << x * a + y * b << endl;
  }
  return 0;
}
