I don't have Reviewing C++ By Alex Maurea book. But someone in facebook post a question from this book which is following

You can see the puzzle at page 542 problem 29.
Now I think the answer should be log2123456798. Am I right or I am tackling the question wrong way?