#include <bits/stdc++.h>
using namespace std;
int main() {
  int A;
  int B;
  int C;
  int X;
  int Y;
  int x = 0;
  int y = 0;
  int z = 0;
  int goukei = 0;
  cin >> A >> B >> C >> X >> Y;
  int sa = X - Y;
  int a_tarinai = 0;
  int b_tarinai = 0;
  if (sa >= 0) {
    a_tarinai = sa;
  } else {
    b_tarinai = abs(sa);
  }
  int 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;
}
