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