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