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