#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(false);
  long long A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long long res = 100000000;
  for (long long numAB = 0; numAB <= max(X, Y); ++numAB) {
    long long bill = 0;
    bill += numAB * 2 * C;
    long long curX = X - numAB;
    long long curY = Y - numAB;
    if (curX > 0) bill += curX * A;
    if (curY > 0) bill += curY * B;
    res = min(res, bill);
  }
  cout << res << endl;
}
