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