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