#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const double EPS = 1e-9;
const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1},
          dy[] = {0, -1, 0, 1, 1, -1, -1, 1};
int main() {
  long long A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  X *= 2, Y *= 2;
  long long ans = INF;
  for (int c = 0; c <= max(X, Y); c += 2) {
    long long need =
        c * C + A * (max(0LL, X - c + 1) / 2) + B * (max(0LL, Y - c + 1) / 2);
    ans = min(ans, need);
  }
  cout << ans << endl;
  return 0;
}
