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