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