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