#include <bits/stdc++.h>
using namespace std;
template <typename T>
int vector_finder(std::vector<T> vec, T number) {
  auto itr = std::find(vec.begin(), vec.end(), number);
  size_t index = std::distance(vec.begin(), itr);
  if (index != vec.size()) {
    return 1;
  } else {
    return 0;
  }
}
int gcd(int a, int b) {
  if (b > 0) {
    return gcd(b, a % b);
  } else {
    return a;
  }
}
int N;
int main() {
  int A, B, C, X, Y;
  long long unsigned int ans = (1e9);
  cin >> A >> B >> C >> X >> Y;
  for (int i = 0; i < max(X, Y); i++) {
    long long unsigned int cost = A * (X - i) + B * (Y - i) + C * 2 * i;
    if (cost < ans) {
      ans = cost;
    }
  }
  cout << ans << endl;
  return 0;
}
