If A saw 1, he would know that he had 2, and would say so. Therefore, A did not see 1. A says "I don't know my number."
If B saw 2, he would know that he had 3, since he knows that A did not see 1, so B did not see 1 or 2. B says "I don't know my number."
If A saw 3, he would know that he had 4, since he knows that B did not see 1 or 2, so A did not see 1, 2 or 3. A says "I don't know my number."
If B saw 4, he would know that he had 5, since he knows that A did not see 1, 2 or 3, so B did not see 1, 2, 3 or 4. B says "I don't know my number."
........ n statements of ignorance later ........
if X saw n, he would know that he had n + 1, since he knows that ~X did not see 1 ... n  1, so X did see n. X says "I know my number."
And the number is n + 1.
