Stationary bike programs

Count sequences of T levels where each step changes by exactly 1 and all values stay between M and N, modulo 1e9+7.

Medium6Dynamic programmingNo attempts yetTime limit1sMemory limit1024 MB

Problem

Vinícius likes working out at the gym. He agreed with his trainer to get a different exercise program every time he uses the stationary bike. In gym language, a program is a sequence of exercise difficulty levels listed in time order. All of Vinícius's stationary bike programs must last the same number of minutes, and the difficulty must change every minute to the level immediately above or the level immediately below. A difficulty level may never fall below a fixed minimum or rise above a fixed maximum.

In other words, a program of TT minutes is a sequence of TT integers, one difficulty level per minute, where two neighbouring minutes differ by exactly 11. Count the different programs the trainer can build under these rules.

Input

The input consists of a single line with three integers TT, MM, and NN (1T501 \le T \le 50, 1M<N1000001 \le M < N \le 100000).

TT is the number of minutes of the exercise, MM is the smallest allowed difficulty level, and NN is the largest allowed difficulty level.

Output

Print a single line with the number of different programs the trainer can build. This number can be very large, so print it modulo 109+710^9 + 7.