#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll A[200][200];
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int xymax = max(x, y);
  int min_cost = INT_MAX;
  for (int i = 0; i <= xymax; i++) {
    auto cost = max(0, (x - i)) * a + max(0, (y - i)) * b + i * 2 * c;
    min_cost = min(min_cost, cost);
  }
  cout << min_cost << endl;
}
