#include <bits/stdc++.h>
using namespace std;
int main() {
  long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long result = 0;
  if ((a + b) >= (c * 4)) {
    result += std::max({x, y}) * c * 2;
    cout << result << endl;
    return 0;
  }
  float avarage = (float)(a + b) / 2.0f;
  long same = x < y ? x : y;
  if (c <= avarage) {
    result += c * same * 2;
    if (same == x) {
      result += b * (y - x);
    } else {
      result += a * (x - y);
    }
  } else {
    result += a * x;
    result += b * y;
  }
  cout << result << endl;
  int quit;
  cin >> quit;
  return 0;
}
