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