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 T minutes is a sequence of T integers, one difficulty level per minute, where two neighbouring minutes differ by exactly 1. Count the different programs the trainer can build under these rules.