###description Amy asks Mr. B problem A. Please help Mr. B to solve the following problem. Let Fi be fibonacci number. $F_0 = 0, F_1 = 1, F_i = F_{i-1} + F_{i-2}$ Given n and m, please calculate $\sum^n_{i=0}{F_i^m}$ As the answer might be very large, output it module 1000000000.
###input The first and only line contains two integers n, m(1 <= n <= 1000000000, 1 <= m <= 1000).
###output Output a single integer, the answer module 1000000000.