Given an integer , find the number of elements which are even in the first rows of the Pascal's triangle. If you have forgotten, we have attached an image below which shows the first 11 rows of the Pascal's triangle.
The rows of Pascal's triangle are conventionally enumerated starting with row at the top (the 0-th row). The entries in each row are numbered from the left beginning with . So the -th row of the pascal triangle consists of exactly elements. And for each (), the -th element of the -th row is basically from left to right.
The only line of the input contains a single integer ().
Print a single integer, the number of elements which are even in the first rows of Pascal's triangle. As the answer can be very large, compute it modulo .
Input | Output |
---|---|
3 | 1 |
In the first sample case, number of even elements in the first three rows are respectively 0, 0 and 1. Hence the answer is . |
Input | Output |
---|---|
5 | 4 |