How to Prolong the Lifetime of Wireless Sensor Networks