#C11900. Plant Watering Schedule
Plant Watering Schedule
Plant Watering Schedule
In the leap year 2024, there are \(366\) days. Lisa follows a specific schedule to water her plants. The schedule is provided in one of two formats:
- every n days: Lisa waters her plants every \(n\) days. The total number of waterings is computed as \(\lfloor \frac{366}{n} \rfloor\).
- x of month: Lisa waters her plants on the \(x\)th day of each month, regardless of \(x\). In this case, the total number of waterings is \(12\) (once per month).
Your task is to determine the number of times Lisa will water her plants in the year 2024 based on the provided schedule string.
inputFormat
The input consists of a single line string that represents the watering schedule. The string will be in one of the following formats:
every n days
(for example, "every 3 days")x of month
(for example, "15 of month")
Extra spaces or newline characters might be present at the beginning or end of the input.
outputFormat
Output a single integer representing the total number of times Lisa will water her plants in the year 2024, printed to standard output.
## sampleevery 1 days
366