Problem N. 37. Days to years
Input file name: standard input
Output file name: standard output
Time limit: 1 s
Memory limit: 1024 MB
A space traveler entered a cryosleep chamber on January 1, 2001. After a long journey through the cosmos, the traveler has finally woken up. The ship's computer shows that exactly n days have passed since the sleep began.
The traveler wants to know how many full years they were asleep.
A year is considered "full" if all its days have passed. In this galaxy, we follow the Gregorian calendar rules:
  • A leap year has 366 days; a common year has 365 days.
  • A year is a leap year if it is divisible by 4, unless it is divisible by 100 but not by 400.
  • (e.g., 2004, 2000, and 2400 are leap years; 2001, 2100, and 2200 are not).

Input

The only line of the input contains a single integer n (0 \le n \le 10^{18}), the number of days passed.

Output

Print a single integer — the number of full years the traveler was asleep.

Examples

standard inputstandard output
365 1
364 0
1461 4

Note

In the third example, 1461 days correspond to exactly 4 years starting from January 1, 2001: 2001 (365 days), 2002 (365 days), 2003 (365 days), and 2004 (366 days). 365 + 365 + 365 + 366 = 1461.