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