#include <bits/stdc++.h>
using namespace std;
typedef std::priority_queue<int> IntPrioQueue;
typedef std::priority_queue<int, std::vector<int>, std::greater<int> >
    IntReversePrioQueue;
const int MAX = 200000;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = 1 << 31 - 1;
const int MOD = 1000000007;
int dx4[4] = {1, 0, -1, 0};
int dy4[4] = {0, 1, 0, -1};
int dx8[8] = {1, 0, -1, 1, -1, 1, 0, -1};
int dy8[8] = {1, 1, 1, 0, 0, -1, -1, -1};
void solve(void) {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int Z = min(X / 2, Y / 2) * 2;
  int ans =
      Z * min(A + B, 2 * C) + (X - Z) * min(2 * C, A) + (Y - Z) * min(2 * C, B);
  cout << ans << '\n';
}
int main(void) {
  solve();
  return 0;
}
