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