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