#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int ans = 100000000;
  for (int k = 0; k <= 100000; k++) {
    int X2 = max(X - k, 0);
    int Y2 = max(Y - k, 0);
    ans = min(ans, X2 * A + Y2 * B + 2 * C * k);
  }
  cout << ans << endl;
  return 0;
}
