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