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