#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int minp = A * X + B * Y;
  for (int c = 2; c < max(2 * X, 2 * Y); c += 2) {
    int p = A * (X - c / 2) + B * (Y - c / 2) + C * c;
    if (p > minp) {
      cout << minp << endl;
      return 0;
    } else {
      minp = p;
    }
  }
  cout << minp << endl;
}
