



def 	__snake_case      (     _UpperCAmelCase = 100							):
    __a					=							[[0 for _ in range(_UpperCAmelCase							)] for _ in range(m + 1							)]
    for i in range(m + 1							):
        __a					=							1

    for n in range(m + 1							):
        for k in range(1  ,					_UpperCAmelCase							):
            memo[n][k] += memo[n][k - 1]
            if n > k:
                memo[n][k] += memo[n - k - 1][k]

    return memo[m][m - 1] - 1


if __name__ == "__main__":
 print(solution(int(input('''Enter a number: ''').strip())))










from __future__ import annotations

__snake_case		:Union[str, Any] 						=	{1: 1}





def 	__snake_case      (     _UpperCAmelCase							):
    if n in COLLATZ_SEQUENCE_LENGTHS:
        return COLLATZ_SEQUENCE_LENGTHS[n]
    __a					=							n // 2 if n % 2 == 0 else 3 * n + 1
    __a					=							collatz_sequence_length(_UpperCAmelCase							) + 1
    __a					=							sequence_length
    return sequence_length





def 	__snake_case      (     _UpperCAmelCase = 1000000							):
    __a					=							max((collatz_sequence_length(_UpperCAmelCase							), i) for i in range(1  ,					_UpperCAmelCase							)							)
    return result[1]


if __name__ == "__main__":
 print(solution(int(input().strip())))





