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