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