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