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