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