#include <bits/stdc++.h>
using namespace std;
int a, b, c;
int x, y;
int main() {
  std::cin >> a >> b >> c >> x >> y;
  int res = 0;
  if (0)
    res = a * x + b * y;
  else {
    if (2 * c <= a || 2 * c <= b)
      res = 2 * c * max(x, y);
    else
      res = 2 * c * min(x, y) + max(0, x - y) * a + max(0, y - x) * b;
  }
  std::cout << res << '\n';
}
