#include <bits/stdc++.h>
using namespace std;
int main() {
  long long A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  if (X == Y) {
    cout << min((C * X * 2), ((A + B) * X)) << endl;
  } else {
    long long sum = 0;
    int t = min(X, Y);
    sum += (min((C * 2), (A + B))) * t;
    sum += (abs(X - Y)) * min(A, 2 * C);
    cout << sum << endl;
  }
}
