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