Three ones
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
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 .
Output
Print the required number of sequences modulo .
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 23K
Acceptance rate 37%