#include <bits/stdc++.h>
#include <cmath>
using namespace std;
int main(){
  long int A,B,C,X,Y,s;cin>>A>>B>>C>>X>>Y;s=A*X+B*Y;
  for(long int i=0;i<=2*max(X,Y);i++){
    s=min(s,max(X-(k-1)/2,0)*A+max(Y-(k-1)/2,0));
  }
  cout<<s<<endl;
}