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