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