#include <bits/stdc++.h>
using namespace std;
int main(void) {
  long long A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long long res = 100000;
  for (int i = 0; i <= 100000; i++) {
    long long price = i * 2 * C + max(0LL, X - i) * A + max(0LL, Y - i) * B;
    res = min(res, price);
  }
  cout << res << endl;
  return 0;
}
