we bought 85 hats at the store. blue hats cost $ 6 and green hats cost $ 7. the total price was $ 560. how many green hats did we buy?	Choose the correct choice from the following options.
A) 36
B) 50
C) 40
D) 42
E) 44
<gadget id="calculator">85 * 6</gadget>
<output>510</output>

<gadget id="calculator">560 - 510</gadget>
<output>50</output>

<result>B</result>
we bought 85 hats at the store. blue hats cost $ 6 and green hats cost $ 7. the total price was $ 560. how many green hats did we buy?
subtract(560, multiply(85, 6))
"let b be the number of blue hats and let g be the number of green hats . b + g = 85 . b = 85 - g . 6 b + 7 g = 560 . 6 ( 85 - g ) + 7 g = 560 . 510 - 6 g + 7 g = 560 . g = 560 - 510 = 50 . the answer is b ."