#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;
}
using ll = long long;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans = 0;
  if (a + b > 2 * c) {
    ans += 2 * c * min(x, y);
    if (min(a, b) > c) {
      ans += abs(x - y) * 2 * c;
    } else if (x > y) {
      ans += a * (x - y);
    } else if (y > x) {
      ans += b * (y - x);
    }
  } else {
    ans += a * x + b * y;
  }
  cout << ans << endl;
  return 0;
}
