Make the array to be of size 1001. This means the array has positions 0 through 1000. Ignore array position 0. Let array position 1 stand for locker 1, etc.