#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 withC = lesser * 2 * C + min((greater - lesser) * greaterP,
                                         (greater - lesser) * 2 * C);
  long long withoutC = lesser * lesserP + greater * greaterP;
  cout << min(withC, withoutC) << endl;
  return 0;
}
