Shyann won 40 halloween candies playing the toss at her school's carnival. Later she gave three to each of her friends. She only has remaining. How many friends does she have?