solve for numbers less than 6 digits