Graham and James both need to buy some blank badges for the people attending meetings this weekend to write their names on. They both wish to spend the smallest amount of money for the badges. The prices for different packets of badges are given in the table below.

There will be 40 people attending Graham’s meeting and 30 people attending James’s meeting.