#include <bits/stdc++.h>
using namespace std;
int A, B, C, X, Y;
int main() {
  cin >> A >> B >> C >> X >> Y;
  cout << (A + B <= 2 * C
               ? A * X + B * Y
               : 2 * C * min(X, Y) + A * (X - min(X, Y)) + B * (Y - min(X, Y)))
       << "\n";
  return 0;
}
