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