#include <bits/stdc++.h>
using namespace std;
void Show(vector<vector<bool>> S) {
  for (int i = 0; i < S.size(); i++) {
    for (int j = 0; j < S[i].size(); j++) {
      if ((S[i][j])) {
        cout << '.';
      } else {
        cout << '#';
      }
    }
    cout << endl;
  }
}
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int Price = 0;
  if (C * 2 < A && C * 2 < B) {
    Price = max(X, Y) * C * 2;
  } else if (C * 2 < A) {
    Price = C * 2 * X;
    if (Y > X) Price += (Y - X) * B;
  } else if (C * 2 < B) {
    Price = Y * C * 2;
    if (X > Y) Price += (X - Y) * B;
  } else if (C < (A + B) / 2) {
    Price = min(X, Y) * C * 2;
    Price += (X < Y) ? (Y - X) * B : (X - Y) * A;
  } else {
    Price = X * A + Y * B;
  }
  cout << Price << endl;
}
