For every two bags of grapes in the market, seven pears are sold. If the total amount of grapes and pears sold at the market is 810, how many were grapes?