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