A $10,000 Bet with a Bartender... Would you take it?

From Algorithms in a Nutshell by O'Reilly:

"A bartender offers the following $10,000 bet to any patron. "I will choose a number from 1 to 1,000,000 and you can guess 20 numbers, one at a time; after each guess, I will either tell you TOO LOW, TOO HIGH, or YOU WIN. If you win in 20 questions, I give you $10,000; otherwise, you give me $10,000." Would you take this bet?"

So, would you take the bet?

You should, but why?