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