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