CLOCK1 - Clock

Calculate the number of times the 29-​th day (if exists) of the month will be on a Saturday throughout year N. (2000 <= N <= 3000)

Solve this problem by at most 256 Bytes of source code.

The judge of this problem is "Exact judge".

Input

Each line contains one integer N. Input terminates by EOF.

Output

Each line contains one integer - the answer.

Example

Input:
2017
2008

Output:
2
2

Added by:Fudan University Problem Setters
Date:2008-12-07
Time limit:1s
Source limit:256B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All
Resource:Own Problem

hide comments
2019-05-07 11:10:13
211 bytes and AC!
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.