#include <bits/stdc++.h>
using namespace std;
int in() {
  int temp;
  scanf("%d", &temp);
  return temp;
}
long long lin() {
  long long temp;
  scanf("%lld", &temp);
  return temp;
}
int main() {
  long long A = lin();
  long long B = lin();
  long long C = lin();
  long long X = lin();
  long long Y = lin();
  long long lesser = (X > Y) ? Y : X;
  long long lesserP = (X > Y) ? B : A;
  long long greater = (X < Y) ? Y : X;
  long long greaterP = (X < Y) ? B : A;
  long long ans = INT_MAX;
  for (auto i = 0; i <= greater; i++) {
    if (ans > 2 * C * i + (greater - i) * greaterP +
                  max(0LL, (lesser - i) * lesserP)) {
      ans = 2 * C * i + (greater - i) * greaterP +
            max(0LL, (lesser - i) * lesserP);
    }
  }
  cout << ans << endl;
  return 0;
}
