#include <bits/stdc++.h>
using namespace std;
const double pi =
    3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342;
const int mod = 1000000007;
int main() {
  int a, b, c, x, y;
  int n = mod, ans;
  cin >> a >> b >> c >> x >> y;
  for (int i = (0); i <= (max(x, y)); ++i) {
    n = 2 * i * c + max(x - i, 0) * a + max(y - i, 0) * b;
    if (n < ans) ans = n;
  }
  cout << ans;
  return 0;
}
