#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int a, b, c, x, y;
  int ans = 0;
  cin >> a >> b >> c >> x >> y;
  ans = a * x + b * x;
  for (int i = 0; i <= max(x, y); i++) {
    int xx = x - i;
    int yy = y - i;
    if (xx < 0) xx = 0;
    if (yy < 0) yy = 0;
    ans = min(ans, a * xx + b * yy + 2 * c * i);
  }
  cout << (ans) << endl;
}
