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