Task
Old Man Ivan, a hard working farmer, tired after a long day of beating the fields, he decided to go to bed.
Being a religious man, he was visited at night by Apostle in a dream. He promised Ivan that his next harvest will be rich, if the farmer is able to help him out with a problem that had been bothering the poor Apostle for a long time.
"Given and , natural numbers, and is even, find out the sum of the first palindromes with digits".
Because Apostle knows that Old Man Ivan is a mere mortal, he only wants the remainder of this sum when divided by .
Help Ivan solve the problem.
Input
The only line of the input consists of two integers, and .
Output
The output will contain the answer requested by the Apostle.
Restrictions
- For tests worth points, .
- For tests worth more points, .
- For tests worth more points, .
Example
stdin
3 4
stdout
3333
Explanation
The first palindromes with digits are . The sum will be .