#include <bits/stdc++.h>
using namespace std;
int main() {
  long long A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  long long sum1 = A * X + B * Y, sum2 = min(X, Y) * C * 2;
  if (X > Y) sum2 += (X - Y) * A;
  if (Y > X) sum2 += (Y - X) * B;
  cout << fixed << setprecision(0) << min(sum1, sum2);
  return 0;
}
