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