#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000000;
const long long inff = 1000000000000000000;
int main() {
  long long a, b, c, x, y;
  cin >> a >> b >> c >> x >> y;
  int ans;
  if (((a + b) / 2) > c) {
    if (a > c && b > c) {
      long long xy = max(x, y);
      long long ans = (2 * xy) * c;
      cout << ans << endl;
    } else {
      long long xy = min(x, y);
      long long ans = (2 * xy) * c;
      if (x > y) {
        ans += (x - y) * a;
        cout << ans << endl;
        return 0;
      } else {
        ans += (y - x) * b;
        cout << ans << endl;
        return 0;
      }
    }
  } else if ((a + b) / 2 == c) {
    int all = a * x + b * y;
    int cll = (max(x, y) * 2) * c;
    cout << min(all, cll) << endl;
  } else {
    long long ans = (a * x) + (b * y);
    cout << ans << endl;
  }
  return 0;
}
