1036 Lucky tickets.

http://acm.timus.ru/problem.aspx?space=1&num=1036
We calculated a number of lucky tickets with 2N digits.
We have to calculate a number of lucky tickets with ALL digits sum
defined.