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