#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, j, k, a, b, c, n, t, m, x, y;
  vector<long long int> v, s, su;
  map<string, long long int> ma, sa;
  map<string, long long int>::iterator it;
  string st, et;
  cin >> a >> b >> c >> x >> y;
  t = 0;
  if (y < x) {
    t = 2;
  }
  if (x < y) {
    swap(x, y);
    t = 1;
  }
  v.clear();
  m = 0;
  for (i = 0; i <= x; i++) {
    m = 0;
    m = m + ((x - i) * a);
    if ((y - i) >= 0) {
      m = m + ((y - i) * b);
    }
    m = m + (i * 2 * c);
    v.push_back(m);
  }
  sort(v.begin(), v.end());
  cout << v[0] << endl;
}
