<t>Assume you have K beans left, then you have picked totally x = ( n - k ) + n + 1 times. so you need to get the prob for toss a coin x times, get exact n heads( tails ) for first x - 1 try and get heads( tails ) again in last toss. Rember k = 0 will be a special case, where the last toss could be ...