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