First, your gold stickers will be destroyed—the ones that you couldn't trade anyway—beginning with 3-star ones, then 4-star ones, then 5-star ones. 

If destroying the golden stickers doesn't provide the required number of stars, duplicates of regular stickers will be used up next, beginning with 1-star ones.

You may also have some "free" stars left from previous exchanges; if so, they will be used first, before destroying golden stickers.