#include <bits/stdc++.h>
using namespace std;
vector<long long> to[1000005];
int main() {
  long long a, b, c, d, e;
  cin >> a >> b >> c >> d >> e;
  c *= 2;
  if (a + b > c) {
    if (d > e)
      cout << min(e * c + (d - e) * a, d * c);
    else
      cout << min(d * c + (e - d) * a, e * c);
  } else
    cout << a * d + b * e;
}
