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