#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int ans = A * X + B * Y;
  for (int k = 1; k <= min(X, Y); k++) {
    ans = min(ans, 2 * C * k + max(0, X - k) * A + max(0, Y - k) * B);
  }
  cout << ans;
}
