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