Valmiki Ramayana Sundara Kanda Sarga 13 Shloka 40
Original Shlokaहस्तादानो मुखादानो नियतो वृक्षमूलिकः।।5.13.40।। वानप्रस्थो भविष्यामि ह्यदृष्ट्वा जनकात्मजाम्। सागरानूपजे देशे बहुमूलफलोदके।।5.13.41।।
1 source checked for this shloka
जनकात्मजाम् Janaka's daughter, अदृष्ट्वा by not seeing, हस्तादानः food available to hand, मुखादानः and mouth, नियतः strictly, बहुमूलफलोदके filled with fruits roots and water, सागरानूपजे on the shore of the sea, देशे here, वृक्षमूलिकः surviving on roots of trees, वानप्रस्थः like a hermit, भविष्यामि I will be.
"If Janaki is not found I will stay here and live like a hermit subsisting on whatever is available on this sea shore, which has abundance of roots, fruits and water.