Counting and Subtraction of Bears, Books and Dogs Puzzle