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