Table of contents
topic
Find the minimum number of steps from coordinate zero to coordinate point n. You can only move 2 or 3 to the left or right along the abscissa axis at a time. Note: The coordinate point of the path can be a negative input description. Coordinate
point
n
output describes
the output from coordinate zero The minimum number of steps to move to coordinate point n
Remark
1 <= n <= 10^9Example 1:
Input4
output2
Explanation
To move from coordinate zero to 4, at least two steps are required, that is, move to the right by 2, and then move to the right by 2