Using the combinatorial approach to Heegaard Floer homology we obtain a relatively easy formula for computation of hat Heegaard Floer homology for the three-manifold obtained by rational surgery on a knot K inside a homology sphere Y.