#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using P = pair<int, int>;
using T = tuple<int, int, int>;
using edge = struct { int to, cost; };
const int MOD = 1e9 + 7;
const int iINF = 1e9;
const long long int llINF = 1e18;
const double PI = acos(-1.0);
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  if (B / 2 > C && A / 2 > C) {
    cout << max(X, Y) * C * 2 << endl;
  } else {
    ll ans = 0;
    if (A / 2 > C / 2) {
      ans += X * C * 2;
      if (Y > X) ans += (Y - X) * B;
    } else if (B / 2 > C / 2) {
      ans += Y * C * 2;
      if (X > Y) ans += (X - Y) * A;
    }
    cout << min(ans, (ll)(A * X + B * Y)) << endl;
  }
  return 0;
}
