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