#include <bits/stdc++.h>
using namespace std;
template <typename T>
istream &operator>>(istream &is, vector<T> &vec) {
  for (T &x : vec) is >> x;
  return is;
}
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  vector<int> ans;
  for (int i = 0, i_len = (1000001); i < i_len; ++i) {
    ans.push_back(i * 2 * c + a * max(0, x - i) + b * max(0, y - i));
  }
  cout << *min_element(ans.begin(), ans.end()) << endl;
  return 0;
}
