Three ones#401

Three ones

1 second
128 megabytes
Medium (≈1350)

Find the number of sequences of length , consisting only of zeros and ones, that do not have three one's in a row.

Input

The length of the sequences n~(1 \le n \le 10^5).

Output

Print the required number of sequences modulo .

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading