|Good. Now do 829.|
As much as I would love to see you count from 0 to 829, in the interest of expediency, I'm just going to move onto the next step.
What you're looking for is the value of the "number," plus 1 (since you start counting at 0, and not 1).
829 can be written as (800 + 20 + 9).
Since we're dealing with base 10 (instead of, say, 3), we can say (800 + 20 + 9) = ((8 * 10^2) + (2 * 10^1) + 9).
If this was base 16, we could say (800 + 20 + 9) = ((8 * 16^2) + (2 * 16^1) + 9).
So let's move this from a formula, and put it into words: Take your number; shift it to the left by multiplying it by the base; and add the new digit. Once you're out of digits, you have your number. Add one, and you're done.
How To Ask Questions The Smart Way