#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 1;
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;
}
int A, B, C, X, Y;
int main() {
  cin >> A >> B >> C >> X >> Y;
  int res = 0;
  int Z = min(X, Y);
  X = X - Z;
  Y = Y - Z;
  res += min(A + B, 2 * C) * Z;
  res += A * X + B * Y;
  cout << res << endl;
}
