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