  We calculate the rank gradient and p-gradient of free products, free products
with amalgamation over an amenable subgroup, and HNN extensions with an
amenable associated subgroup. The notion of cost is used to compute the rank
gradient of amalgamated free products and HNN extensions. For the p-gradient
the Kurosh subgroup theorems for amalgamated free products and HNN extensions
will be used.
