#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c,x,y;
  cin >> a >> b >> c >> x >> y;
  if (a >= 2*c && b >= 2*c){
  	cout << 2*c*max(x,y) << endl;
  }
  else if (a+b <= 2*c)){
    cout << a*x+b*y << endl;
  }

  else{
    if (x >= y){
        cout << 2*c*y+(x-y)*a << endl;
    }
    else if (x < y){
        cout << 2*c*x+(y-x)*b << endl;
    }
  }
}

