#include <bits/stdc++.h>
using namespace std;
const long long INF = numeric_limits<long long int>::max();
const long long MOD = 1000000007;
const long double PI = 3.1415926;
template <class T>
T &chmin(T &a, const T &b) {
  return a = min(a, b);
}
template <class T>
T &chmax(T &a, const T &b) {
  return a = max(a, b);
}
long long int n, m, k, ans = 0, sum = 0, cnt = 0;
string s;
int main() {
  int A, B, C;
  long long int X, Y;
  cin >> A >> B >> C >> X >> Y;
  if (min(A, min(B, C)) == C) {
    cout << C * max(X, Y) * 2 << endl;
    return 0;
  }
  if (X > Y)
    ans += A * (X - Y);
  else if (X < Y)
    ans += B * (Y - X);
  long long int rest = min(X, Y);
  if (A + B < 2 * C)
    cout << ans + rest * (A + B) << endl;
  else
    cout << ans + rest * 2 * C << endl;
  return 0;
}
