#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 (c <= a && c <= b) {
    cout << max(x, y) * 2 * c << endl;
  } else if (c > a && x > y) {
    cout << c * y * 2 + a * (x - y) << 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 - x) << endl;
  }
  return 0;
}
