eolymp
bolt
Try our new interface for solving problems
Problems

Lucky tickets

Lucky tickets

Find the number of lucky tickets with the sum of the first three digits $n$. Ticket is called lucky if it is a six-digit number and the sum of the first three digits equals to the sum of the last three digits. \InputFile One positive integer $n~(n \le 27)$. \OutputFile Print the number of required lucky tickets.
Time limit 1 second
Memory limit 128 MiB
Input example #1
1
Output example #1
9