cho.sh
Notes
Loading...

Tiling

Time limit

1s

Memory limit

128 MB

Problem

Given a 2×n rectangle, count how many ways it can be filled completely using only 2×1 tiles and 2×2 tiles. A 2×1 tile may be placed horizontally or vertically, and tiles must not overlap or extend outside the rectangle.

Input

The input consists of multiple test cases. Each test case is given on its own line and contains an integer n.

Output

For each test case, output the number of ways to tile the 2×n rectangle on its own line.

Constraints

  • 0 ≤ n ≤ 250