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