#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, x, y;
  long long ans = 1e9;
  cin >> a >> b >> c >> x >> y;
  for (long long i = 1; i <= x; i++) {
    ans =
        min(ans, i * a + (x - i) * 2 * c + max(y - (x - i), (long long)0) * b);
  }
  for (long long i = 1; i <= y; i++) {
    ans =
        min(ans, i * b + (y - i) * 2 * c + max(x - (y - i), (long long)0) * a);
  }
  cout << ans << endl;
  return 0;
}
