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