Bhagavad Gita 4.36
Chapter 4: Knowledge and the offering of action
अपि चेदसि पापेभ्यः सर्वेभ्यः पापकृत्तमः ।
सर्वं ज्ञानप्लवेनैव वृजिनं सन्तरिष्यसि ॥ ३६ ॥
Even if thou art the most sinful of all sinners, yet shalt thou cross over all sin by the raft of wisdom.
Sanskrit text and English translation: Annie Besant, The Bhagavad-Gita, 4th edition (1922) — public domain, via Wikisource. Chapter summaries: SamayaVeda.