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