#GSMATRIX. Matrix
Matrix
Mr. Ganesh, a friend of Mr. Dengklek, give Mr. Dengklek a big matrix A dan asking the result of AN. Because the matrix A is too big and Mr Dengklek doesn't have a lot of time, he wants to minimize the number of multiplication needed for computing AN. In this case, assume Mr. Dengklek always stores the matrices that Mr. Dengklek ever computed, thus, if anytime Mr. Dengklek wants to use that matrix again, he can just directly use it without recomputing it.
You must help Mr. Dengklek to find out the minimum number of multiplication required to compute AN.
Input
The first line consist of a single integer N (1 ≤ N ≤ 120).
Output
In the first line, output the result asked in the problem statement above.
Example Explanation
Here is one of the possible minimum calculation to get A15.
Matrices that Mr. Dengklek have : A
1st multiplication : A × A = A2
Matrices that Mr. Dengklek have : A, A2
2nd multiplication : A × A2 = A3
Matrices that Mr. Dengklek have : A, A2, A3
3rd multiplication : A3 × A3 = A6
Matrices that Mr. Dengklek have : A, A2, A3, A6
4th multiplication : A6 × A6 = A12
Matrices that Mr. Dengklek have : A, A2, A3, A6, A12
5th multiplication : A12 × A3 = A15
Example
Input: 15</p>Output: 5