#include <bits/stdc++.h>
int main(int argc, char *argv[]) {
  int a, b, c, x, y;
  std::cin >> a >> b >> c >> x >> y;
  int n = 5000;
  int ans = INT_MAX;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) {
      int l = std::max(x - i, y - j);
      if (l > 0)
        ans = std::min(ans, i * a + j * b + c * l * 2);
      else
        ans = std::min(ans, i * a + j * b);
    }
  std::cout << ans << std::endl;
}
