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