P15834 [Lanqiao Cup 1st International Contest] Website Expansion
Description
Xiao Ming works at a well-known Internet company, and the company has developed a new feature. The company uses an invitation mechanism to let users try this feature.
Starting from day $1$, there is $1$ user who can use this feature. After this user has used it for one week ($7$ days), they can invite $1$ user to use the feature on day $8$. After that, they can invite $1$ user every $2$ days (on days $11,14,17,\cdots$).
A newly invited user can start using the feature on the same day. After using it for one week ($7$ days), they can start inviting other users, inviting $1$ user every $2$ days.
If every user fully uses their invitation ability, how many users can use this new feature by the end of day $n$?
Input Format
Input one line containing an integer $n$, representing the number of days.
Output Format
Output one integer, representing the answer.
Explanation/Hint
### Constraints
For $30\%$ of the testdata, $1 \le n \le 80$.
For $60\%$ of the testdata, $1 \le n \le 150$.
For all testdata, $1 \le n \le 300$.
Translated by ChatGPT 5