ok i know this might sound wierd, but the problem comes down to knowing how to do this ...and i just don't see how i could do it. maybe there's someone out there who can enlighten me

ok the question is something like this (hope i'll be clear enough:-s ):

consider a text file in which we have a binary number with a maximum of 1000000 digits. (that means i have a randome repetition of "1" and "0", no blanks). how do i count the number of zeros which follow the last "1"?
example: my number 10011100011100000, and the number of zeros is 5. oh and i have to do this without copying the information of the file into a variable...without using extra memory

thanks! much apreciated, guys.