Sunland Company incurred $610000 of research and development costs in its laboratory to develop a new product. It spent $87000 in legal fees for a patent granted on January 2, 2021. On July 31, 2021, Sunland paid $54000 for legal fees in a successful defense of the patent. What is the total amount that should be debited to Patents through July 31, 2021?