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