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