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