You are given four positive integers , , , and , which define the following recurrence:
Given , compute x_n \bmod 1000000007.
The only line of the input contains five integers , , , , and (1 \leq a < b \leq 2000, 1 \leq c, d \leq 100, 1 \leq n \leq 10^9).
Output x_n \bmod 1000000007.
Example 1