2251. 
Jim starts with a positive integer and creates a sequence of numbers. Each successive number is obtained by subtracting the largest possible integer square less than or equal to the current number until zero is reached. For example, if Jim starts with , then his sequence contains numbers:
Let be the smallest number for which Jimâ€™s sequence has numbers. What is the units digit of ?
This problem is copyrighted by the American Mathematics Competitions.

Instructions for entering answers:
For questions or comments, please email markan@eudelic.com.