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