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