We can make digits with matches as shown below:

Given matches, find the number of different numbers that can be represented using the matches. You can only make numbers greater than or equal to , so negative numbers are not allowed. For example, if you have matches, you can only make the numbers or . If you have matches, you can make the numbers , , or . Note that leading zeros are not allowed (e.g. , , etc. are not allowed). However, numbers such as , , etc. are permitted.
The input contains no more than lines. Each line contains a single integer (1 \leq N \leq 2000).
For each from the input, output on a separate line the number of different non-negative integers that can be represented using matches.
Example 1