"Abraham believed God, and it was credited to him as righteousness." (Rom. 4 v.3)
Paul says that Jesus has "credited" or "imputed" us with righteousness.
In this tableau, you go to the Righteousness Bank and ask if you've got enough righteousness to buy your way into Heaven, and the teller looks your account up on the computer and, taking a sharp intake of breath, tells you you haven't even got enough to pay for a third-class half-hour tour of Heaven let alone enough to stay there for all eternity. You go home disappointed, but that night you give your heart to Christ, and the next day, the bank manager rings you up and says he's awfully sorry but the teller must have made a mistake and you can come in and collect your righteousness any time you want. So you go to the bank and ask the teller what happened, and he says that this chap called Jesus came in and credited your account with loads and loads of righteousness! You haven't earned your way into Heaven - Jesus has done it all for you.