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