#include <bits/stdc++.h>
using namespace std;
int main() {
  long A;
  long B;
  long C;
  long X;
  long Y;
  long goukei = 0;
  cin >> A >> B >> C >> X >> Y;
  long sa = X - Y;
  long a_tarinai = 0;
  long b_tarinai = 0;
  if (sa >= 0) {
    a_tarinai = sa;
  } else {
    b_tarinai = abs(sa);
  }
  long saishou_mai = min(X, Y);
  if ((2 * C) >= (A + B)) {
    goukei = (A * saishou_mai) + (B * saishou_mai) + (A * a_tarinai) +
             (B * b_tarinai);
  } else if ((2 * C) < (A + B)) {
    goukei = (2 * C * saishou_mai) + (A * a_tarinai) + (B * b_tarinai);
  }
  cout << goukei << endl;
  return 0;
}
