#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
using namespace std;
 
int main (void) {
  int A, B, C, X, Y;
  long long money;
  cin >> A >> B >> C >> X >> Y;
  money= A*X+B*Y;
  if (A+B > C*2 ) {
    if (X>= Y && A <= C*2) {
      money= min(money, 2*C*Y +A*(X-Y));
    }
    if (X>= Y && A > C*2) {
      money =min(money, 2*C*X);
    }
    if (X< Y && B <= C*2) {
      money= min(money, 2*C*Y +B*(Y-B));
    }
    if (X< Y && B > C*2) {
      money =min(money, 2*C*Y);
    }
  }
  cout << money;
}