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