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