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