int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int A,B,C,X,Y;
  cin>>A>>B>>C>>X>>Y;
  int ans=A*X+B*Y;
  int N=2*max(X,Y);
  for (int i=2; X && Y; i+=2) {
    ans=min(ans,C*i+(X-1)*A+(Y-1)*B);
    X--; Y--;
  }
  cout<<ans<<endl;
  return 0;
}