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