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