#include <bits/stdc++.h>
using namespace std;
constexpr int kMod = 1000000007;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int Z = max(X, Y);
  int vmin = INT_MAX;
  for (int i = 0; i < Z; ++i) {
    int cost = 2 * 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;
}
