A stone is falling freely from rest and the total distance covered by it in the last second of its motion equals the distance covered by it in the first 3 seconds of its motion. How long does the stone remain in air?