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