#include <bits/stdc++.h>
using namespace std;
int main() {
  int i = 0, ans = 0;
  int A, B, C, X, Y;
  cin >> A >> B >> C >> X >> Y;
  C *= 2;
  int X2 = X;
  int Y2 = Y;
  ans += min(X, Y) * min(C, A + B);
  X2 -= min(X, Y);
  Y2 -= min(X, Y);
  cout << ans + A * X2 + B * Y2 << endl;
}
