405851: GYM102135 D Friends rescue
Description
Once, during the evening walk through the forest, the boy Vova came to the river and saw that his friend Vanya was stuck on the other shore. Vova needs to save his friend, because he can not swim! There are n × (n + 1) islands in the river in the form of a grid. However, there are no bridges between them! There on the shore Vova met an evil wizard Zedikus, who agreed to help him only if Vova solves one difficult task. Vova needs to calculate the number of ways to build bridges so that there is at least one way from one shore to another. Help Vova solve this problem. Vova is allowed to build bridges only between neighboring islands.
More formally, each island has coordinates (r, c) (1 ≤ r ≤ n, 1 ≤ c ≤ n + 1), where r is the line number, and c — column number. If the island has coordinates (r, c), then the neighboring islands have coordinates (r + 1, c), (r, c + 1), (r - 1, c), (r, c - 1), if any exist. The islands that are in the first and last column, that is the islands with coordinates (r, c), where (that is, c is equal to either 1, or n + 1), are already connected to the shores.
The way from one shore to another is a sequence of islands (r1, c1), (r2, c2), ..., (rk, ck) such that for each i (1 ≤ i < k) there is a bridge between the islands (ri, ci) and (ri + 1, ci + 1), also the island (r1, c1) is in the first column (c1 = 1), and the island (rk, ck) is in the last column (ck = n + 1).
Two ways to build bridges are considered different if there is such a bridge that in one way it is built, and in another there is not. For a better understanding, see the illustration of one way to build bridges.
The only line of input contains a single integer n (1 ≤ n ≤ 42) — the dimension of the grid of islands.
OutputOutput a single integer — the answer to the task modulo 109 + 7.
ExamplesInput1Output
1Input
42Output
37237670