#D3724. Beautiful Sequence
Beautiful Sequence
Beautiful Sequence
Alice is spending his time on an independent study to apply to the Nationwide Mathematics Contest. This year’s theme is "Beautiful Sequence." As Alice is interested in the working of computers, she wants to create a beautiful sequence using only 0 and 1. She defines a "Beautiful" sequence of length that consists only of 0 and 1 if it includes successive array of 1s as its sub-sequence.
Using his skills in programming, Alice decided to calculate how many "Beautiful sequences" she can generate and compile a report on it.
Make a program to evaluate the possible number of "Beautiful sequences" given the sequence length and sub-sequence length that consists solely of 1. As the answer can be extremely large, divide it by and output the remainder.
Input
The input is given in the following format.
The input line provides the length of sequence () and the length () of the array that solely consists of 1s.
Output
Output the number of Beautiful sequences in a line.
Examples
Input
4 3
Output
3
Input
4 2
Output
8
inputFormat
outputFormat
output the remainder.
Input
The input is given in the following format.
The input line provides the length of sequence () and the length () of the array that solely consists of 1s.
Output
Output the number of Beautiful sequences in a line.
Examples
Input
4 3
Output
3
Input
4 2
Output
8
样例
4 3
3