I have the general algorithm here that my teacher gave us( see full at http://i.imgur.com/pbzQb.png) )
To count we just divide, correct?
like - 1000/3 = 333 ?
What is the sigma notation used here(it's for principle of inclusion, exclusion I thiink)? Also, I am wondering about the boundary cases: near 1000.
Update: I am close I think i can do this :)