#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  long long result = 2 * c * max(a, b);
  for (int i = 1; i <= (max(x, y)); i++) {
    long long tmp = i * 2 * c + max<long long>(0, (x - i)) * a +
                    max<long long>(0, (y - i)) * b;
    result = min(result, tmp);
  }
  cout << result;
  return 0;
}
