#include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <map>
#include <cmath>
#include <iostream>
#include <algorithm>
#define MAX 1000007
#define MAXN 1007
#define MAXM 1007
#define INF  0x3f3f3f3f
#define NINF 0xc0c0c0c0
#define MOD 1000000007
const double EXP=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> Vec;
typedef vector<Vec> Mat;
//================================================================================================

char s[205][30]; 
int main(){
	int a,b,c,x,y,ans=0;
	cin>>a>>b>>c>>x>>y;
	if(a+b<=2*c) {
		ans+=min(x,y)*(a+b);
	} else {
		ans+=min(x,y)*(c*2);
	}
	int t=min(x,y);
	x-=t;
	y-=t;
	if(x==0) {
		x=y;
		a=b;
	}
	if(a<=2*c) {
		ans+=a*x;
	} else {
		ans+=a*2*c;
	}
	cout<<ans;
    return 0;
}