LearnPy Hub
← Arena
AdvancedRating 1700

Tiling With Dominoes and Trominoes

Count the ways to tile a 2 × n board with 2 × 1 dominoes and L-shaped trominoes (both can be rotated), modulo 1 000 000 007.

Input

One integer n (1 ≤ n ≤ 10⁵).

Output

One integer.

Sample 1

Input
1
Output
1

Sample 2

Input
3
Output
5
solution.py
Output appears here
Tiling With Dominoes and Trominoes · Python Arena problem · LearnPy Hub