The numbers a,b,c are given. Implement the recursive function:
Four nonnegative integers a,b,c (a,b,c≤1000),n (0≤n≤1000).
Print the value of f(n) modulo 109+7.