Ivy is going to the fair with a friend. They will buy cotton candy. They buy 9 bags of it. Each bag cost 2 dollars . What is C the total cost of all the cotton candy if G=2?