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