Gats and the Uplifting Leaps
Gats is crossing a row of rooftops. Rooftop has height .
Exactly distinct rooftops are illuminated. Every subset of rooftops is equally likely to be illuminated. If their indices in increasing order are
Gats starts on rooftop and then jumps from to for every .
A jump is uplifting if its destination is strictly higher than its starting point. In other words, the jump from to is uplifting when
Find the expected number of uplifting jumps.
Input
The first line contains two integers and (, ), the number of rooftops and the number that will be illuminated.
Output
Write the exact expected number of uplifting leaps in lowest terms as . Print the unique integer satisfying
Samples
Sample 1
Input
4 2 3 1 4 2
Output
500000004
Three of the six equally likely illuminated pairs produce an uplifting leap, so the expectation is .
Sample 2
Input
5 3 2 5 1 4 3
Output
300000003
For the ten possible illuminated triples, the total number of uplifting leaps is , giving an expectation of .
Sample 3
Input
3 1 7 2 9
Output
0
When , Gats makes no leaps.