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