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