Buying the vehicle at the end of the lease is only a good idea if the
Residual is less than the current market value. For instance,if the MSRP is $30000 when the car is new and the residual is 50% - that means at the end of the lease you will have to pay $15000 to buy the vehicle. If the
ACV is less than $15000 than you should buy it. However, most leases provided by the dealer are
Subvented. This means the factory artificially inflates the residual so they can advertise a low payment (Mercedes does this quite often). Chances are you are better off financing the car rather than leasing if you intend to own the car longer than the lease contract.
You can read this article on
Lease VS Financing.
Good Luck!