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