Tom and Richard had a total of 2160 g of flour at first. Tom used twice as much flour as The Richard. Richard has twice as much flour left as Tom. The mass of flour that Richard had left was 60g more than what he had used. How much flour did Tom have at first?