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