Srimad-Bhagavatam: Canto 7 - Chapter 1 - Verse 22
Sanskrit:
चरेद्वने द्वादशाब्दानष्टौ वा चतुरो मुनि: ।द्वावेकं वा यथा बुद्धिर्न विपद्येत कृच्छ्रत: ॥ २२ ॥
ITRANS:
cared vane dvādaśābdānaṣṭau vā caturo muniḥdvāv ekaṁ vā yathā buddhirna vipadyeta kṛcchrataḥ
Translation:
Being very thoughtful, a vānaprastha should remain in the forest for twelve years, eight years, four years, two years or at least one year. He should behave in such a way that he will not be disturbed or troubled by too much austerity.