#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
long long gcd(long long a, long long b);
long long lcm(long long x, long long y);
vector<long long> h;
int main() {
  long long a, b, c, x, y;
  long long ans = 0;
  long long ans1 = 0;
  long long ans2 = 0;
  cin >> a >> b >> c >> x >> y;
  if (x >= y) {
    ans = c * y * 2;
    long long tmp = x - y;
    ans += tmp * a;
  } else {
    ans = c * x * 2;
    long long tmp = y - x;
    ans += tmp * a;
  }
  ans1 = a * x + b * y;
  if (x >= y) {
    ans2 = c * x * 2;
  } else {
    ans2 = c * y * 2;
  }
  ans = min(ans, ans1);
  ans = min(ans, ans2);
  cout << ans << endl;
  return 0;
}
