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