P8780 [Lanqiao Cup 2022 NOI Qualifier B] Problem-Solving Statistics.

Description

Xiao Ming decides to start working hard on solving problems to prepare for the Lanqiao Cup contest starting next Monday. He plans to solve $a$ problems per day from Monday to Friday, and $b$ problems per day on Saturday and Sunday. Please help Xiao Ming calculate on which day he will reach a total number of solved problems greater than or equal to $n$ according to his plan.

Input Format

Input one line containing three integers $a$, $b$, and $n$.

Output Format

Output one integer representing the number of days.

Explanation/Hint

For $50 \%$ of the test cases, $1 \leq a, b, n \leq 10^{6}$. For $100 \%$ of the test cases, $1 \leq a, b, n \leq 10^{18}$. Lanqiao Cup 2022 Provincial Contest Group B Problem C. Translated by ChatGPT 5