Shawna won 51 pieces of gum playing basketball at her school's game night. Later, she gave three to each of her friends. She only has 6 remaining. How many friends does she have?