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