#include <bits/stdc++.h>
using namespace std;
char *demangle(const char *demangle) {
  int status;
  return abi::__cxa_demangle(demangle, 0, 0, &status);
}
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int ans = 1001001001;
  for (int i = 0; i < max(A, B) + 1; i++) {
    int cnt = A * max(0, X - i) + B * max(0, Y - i) + C * i * 2;
    ans = min(cnt, ans);
  }
  cout << ans << endl;
  return 0;
}
