eolymp
bolt
Try our new interface for solving problems
Problems

Snooker

Snooker

Snooker - it is one of the varieties of billiards. It involves two players. They in turn went to the desk and clog the balls according to certain rules. If another blow to meet all the rules, the player earns him points and has the right to make the next blow, and so on until the table does not run out of balls. If another blow to break the rules, a player for it receives no points, and the turn passes to another player. The sequence of correct hits is called a series. It is known that after the first series of the Party player is N points. Required to find how many different ways could occur this series. Two ways are considered different if they differ in any strike. Impacts are considered different, if different set of balls that were killed in these attacks. Balls of one color are the same and indistinguishable. \includegraphics{https://static.e-olymp.com/content/b6/b645b4a2181c022660f9ad925e7d6de8215fc9b3.gif} \textbf{Rules.} At the beginning of the game on the table \textbf{15} red balls and \textbf{6} colored one of each color. For each scored a red ball is given one point. For color gives the following points: for the yellow - \textbf{2}, for the green - \textbf{3}, for the brown - \textbf{4}, for the blue - \textbf{5}, with the pink - \textbf{6}, with the black - \textbf{7}. If the game has just begun, is allowed to score one or more red balls, colored hammer can not score the red balls are eliminated from the game, the number dialed by this attack points equal to the number killed balls. If the previous stroke was scored a red ball or a few red balls, one is allowed to score any colored ball, the red hammer can not be scored by a color ball is returned to the field, the number dialed by this attack points equal to the value of the downtrodden colored ball. If the previous stroke was scored colored ball on the table and still have the red balls are allowed to score one or more red balls, colored hammer can not score the red balls are eliminated from the game, the number dialed by this attack points equal to the number of balls were killed. If the previous stroke was scored colored ball on the table is only colored balls, colored ball is allowed to score the minimum cost of those present at the table. Other balls that blow hammer can not be scored by a ball out of the game, the number dialed by this attack points equal to the value downtrodden colored ball. \InputFile The first line contains one integer \textbf{N} (\textbf{1} <= \textbf{N} <= \textbf{147}). \OutputFile Bring one number - the number of different ways to start the game in the series of \textbf{N} points.
Time limit 1 second
Memory limit 64 MiB
Input example #1
3
Output example #1
2
Author Pavel Kuzhnecov