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