#include<bits/stdc++.h>
using namespace std;

int main(){
    int A,B,C,X,Y;
    cin>>A>>B>>C>>X>>Y;

    int ret=5000*100000;
    for(int i=0;i<=max(X,Y);i++){
        ret=min(ret,C*2*i+A*(max(X-i,0))+B*(max(0,Y-i)));
    }
    cout<<ret<<endl;
    }
}