Problems
Pascal`s triangle
Pascal`s triangle
Pascal's triangle - is the real triangle, the edges of which are unity, and each number inside is the sum of two numbers up-to-right and up and left.
Due to an error typographer Pascal's triangle was recorded in a line and formed a kind of sequence \textbf{1}, \textbf{1}, \textbf{1}, \textbf{1}, \textbf{2}, \textbf{1}, \textbf{1}, \textbf{3}, \textbf{3}, \textbf{1}, \textbf{1}, \textbf{4}, \textbf{6}, \textbf{4}, \textbf{1}, ...
\InputFile
Given a string containing an integer \textbf{N} (\textbf{N} ≤ \textbf{600}).
\OutputFile
You want to display a single line containing \textbf{N}-th member of the newly formed sequence.
Input example #1
18
Output example #1
10