Logo C++ Online Judge

C++

时间限制:1 s 空间限制:512 MB
TA:
统计

Week of Tsinghua

2025qiuji.jpg

You are given an integer d, the 1-indexed number of days since 2025-01-01 (inclusive). That is:

  • d = 1 means 2025-01-01
  • d = 2 means 2025-01-02
  • and so on.

Determine the academic week number in Tsinghua University’s academic calendar for the date represented by d.

The input date is guaranteed to be within the calendar range:

  • from 2025-08-20 to 2026-02-23 (inclusive).

Calendar Rules

  • Week 1 starts on 2025-09-15 (Monday).
  • Each academic week is Monday to Sunday.
  • There are 18 weeks in every semester, and holidays still count toward the week number.
  • If the date is before 2025-09-15, output 0.
  • If the date is during winter break, output 19.

Input

One line with one integer: d.

Output

One line with a single integer:

  • 0 if not started yet,
  • 1..18 for teaching weeks,
  • 19 if already on winter break.

Sample

Input

357

Output

15

Explanation: t = 357 corresponds to 2025-12-23, which falls in Week 15.