If your 2000 Avalon displays code p0171-system too lean how do you fix it and how much will it cost?

almost always with this code, replace the mass airflow sensor. the part is about 150.00 and installation is a snap. 2 screws and a plug in a very easy place to find. (right on the aircleaner box)