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