#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <cstring>

using namespace std;

int main(){
	int A,B,C,X,Y;
	cin>>A>>B>>C>>X>>Y;
	int ans=0;
	if((A+B)>=2*C){
		if(A<=C){
			ans+=2*C*Y;
			if(Y<X){
				ans+=A*(X-Y);
			}
		}else{
			ans+=2*C*X;
			if(X<Y){
				ans+=B*(Y-X;
			}
		}
	}else{
		ans+=A*X+B*Y;
	}
	cout<<ans<<endl;
	return 0;
}