SP2530 GNY07H - Tiling a Grid With Dominoes

Description

We wish to tile a grid 4 units high and _**N**_ units long with rectangles (dominoes) 2 units by one unit (in either orientation). For example, the figure shows the five different ways that a grid 4 units high and 2 units wide may be tiled. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/SP2530/3e8ce1d73e1024358dda2439f2be095a1496e75b.png) Write a program that takes as input the width, _**W**_, of the grid and outputs the number of different ways to tile a 4-by-_**W**_ grid.

Input Format

The first line of input contains a single integer _**N**_, (1 **N** Each dataset contains a single decimal integer, the width, _**W**_, of the grid for this problem instance.

Output Format

For each problem instance, there is one line of output: The problem instance number as a decimal integer (start counting at one), a single space and the number of tilings of a 4-by-_**W**_ grid. The values of _**W**_ will be chosen so the count will fit in a 32-bit integer.