#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long ans = 1 << 29;
  long long total;
  for (int i = 0; i <= min(x, y); ++i) {
    total = 2 * c * i + a * (x - i) + b * (y - i);
    ans = min(ans, total);
  }
  long long total1;
  long long ans1 = 1 << 29;
  if (x >= y) {
    for (int j = 0; j <= x - y; ++j) {
      total1 = 2 * c * y + 2 * c * j + a * ((x - y) - j);
      ans1 = min(total1, ans1);
    }
  }
  long long total2;
  long long ans2 = 1 << 29;
  if (x <= y) {
    for (int j = 0; j <= y - x; ++j) {
      total2 = 2 * c * x + 2 * c * j + b * ((y - x) - j);
      ans2 = min(total2, ans2);
    }
  }
  long long ab = min(min(ans, ans1), ans2);
  cout << ab << endl;
}
