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