#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#include <functional>
#include <numeric>
#include <ctime>
#include <cassert>
#include <cstring>
#include <fstream>
 
using namespace std;
int main(){
int A,B,C;
cin>>A>>B>>C;
int X,Y;
cin>>X>>Y;
for (int i=0;i<N;i++){
int k;
cin>>k;


}
cout<<2Ck+max{X-k,0}*A+max{Y-k,0}*B<<endl;
}