XP is a very clever boy. When he was in primary school, he could solve some difficut math problems. For example, he could get the answer of problem 12 + 32= ? in five minutes. But he is poor in solving equations. But now, XP is no longer a little kid. He has made a great improvement in solving equations. He can solve a large number of diverse equations. He always show this skill in front of EG; He created a equation:x1+x2+...+xk=f(n), f(n)=(n^n)%1111, xi(i=1, 2 ,...,k)is a positive integer. Find out how many groups of x1,x2...xk fulfil the equation?. He said to EG " you can't solve it in one week ". EG understood you knew how to solve it, so she asks you for help, and she said if you can solve it, she would give you kiss.
One line with the number of groups of answer.
The first case: 1+3=4 2+2=4 3+1=4 ,so the answer is 3.