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