Appropriate temperature changes are essential for brewing delicious tea. Noli has been taught a recipe for delicious tea.
The recipe is represented by a sequence of non-negative integers of length . She must change the temperature accordingly.
Raising the temperature is hard work. The cost of a recipe is defined by the following .
Noli has forgotten the recipe she was taught. All she remembers is that and that the cost was .
How many possible recipes can be considered? Find the remainder of the number of possible recipes divided by .
Note that two recipes are different when the values of are different for any .