We study hedonic coalition formation games that consist of a finite set of agents and a list of agents’ preferences such that each agent’s preferences depend only on the members of her coalition. An outcome of a hedonic coalition formation game is a partition (i.e., coalition structure) of the finite set of agents. We study the existence of partitions that are both internally stable and Pareto optimal. We construct an algorithm that terminates for each given hedonic coalition formation game such that the outcome of the algorithm is internally stable and Pareto optimal. We also show that if the outcome of the algorithm is the partition that consists of singleton coalitions then it is also core stable and if it is the partition that contains only the grand coalition then it is also both core stable and Nash stable.