#include <bits/stdc++.h>
using namespace std;
int A, B, C, X, Y;
int main() {
  int amount = 0, amount1 = 0, amount2 = 0, amount3 = 0, amount4 = 0;
  cin >> A >> B >> C >> X >> Y;
  if (X > Y)
    　cout << min(A + B, C * 2) * Y + min(A, C * 2) * (X - Y) << endl;
  else
    　cout << min(A + B, C * 2) * X + min(B, C * 2) * (Y - X) << endl;
  return 0;
}
