#include <bits/stdc++.h>
using namespace std;
constexpr int kMod = 1000000007;
int main() {
  long long A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long long Z = max(X, Y);
  long long vmin = LLONG_MAX;
  for (long long i = 0; i < Z; ++i) {
    long long cost = 2LL * i * C;
    if (X - i > 0) cost += A * (X - i);
    if (Y - i > 0) cost += B * (Y - i);
    vmin = min(vmin, cost);
  }
  cout << vmin << endl;
}
