#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  if (2 * c > a + b) {
    cout << a * x + b * y << endl;
  } else {
    int fill_ab = min(x, y);
    if (fill_ab % 2 != 0) {
      fill_ab--;
    }
    int res = c * fill_ab * 2 + (x - fill_ab) * a + (y - fill_ab) * b;
    if ((x % 2 == 0) && (x >= y)) {
      res = min(res, x * 2 * c);
    }
    if ((y % 2 == 0) && (x <= y)) {
      res = min(res, y * 2 * c);
    }
    cout << res << endl;
  }
  return 0;
}
