#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int a, b, c;
  a = max(X, Y) * 2 * C;
  if (X > Y)
    b = Y * 2 * C + (X - Y) * A;
  else
    b = X * 2 * C + (Y - X) * A;
  c = X * A + Y * B;
  cout << min(min(a, b), c) << endl;
}
