#include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
template <class T>
inline T sqr(T x) {
  return x * x;
}
const long long mod = 1000000007;
const double PI = acos(-1.0);
const int INF = 1e9 + 7;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b, c;
  cin >> a >> b >> c;
  int x, y;
  cin >> x >> y;
  int mini = min(x, y);
  int sum = 0;
  if (a + b > 2 * c) {
    sum = mini * 2 * c;
    if (x > y) {
      cout << sum + (x - y) * min(a, 2 * c) << endl;
    } else if (x < y) {
      cout << sum + (y - x) * min(a, 2 * c) << endl;
    } else {
      cout << sum << endl;
    }
  } else {
    cout << a * x + b * y << endl;
  }
  return 0;
}
