2012 AIME II Problem 7

Let S be the increasing sequence of positive integers whose binary representation has exactly 8 ones. Let N be the 1000th number in S. Find the remainder when N is divided by 1000 .