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