A golf driving range has small buckets of golf balls for $6 each and medium buckets of golf balls for $8 each. One day, golfers use 27 small buckets and some medium buckets for a total cost of $626. Write an equation you can use to find the number m of medium buckets used