#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long long LINF = 1e18;
int main() {
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  int ans = 0;
  map<int, int> T;
  T[X] = A;
  T[Y] = B;
  if (A + B <= 2 * C)
    ans = A * X + B * Y;
  else {
    ans = min(min(X, Y) * C + (max(X, Y) - min(X, Y)) * T[max(X, Y)],
              max(X, Y) * C);
  }
  cout << ans << endl;
}
