#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 = 10000000;
  for (long long i = 0; i <= 100000; i++) {
    ans = min(ans, (i * 2 * C + max(0LL, X - i) * A + max(0LL, Y - i) * B));
  }
  cout << ans << endl;
  return 0;
}
