using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Text; using System.Text.RegularExpressions; using System.Linq; class Magatro { static long N = long.Parse(Console.ReadLine()); static void Main() { long cnt = 0; long year = N - 2014; long loop = year/400; long amari = year % 400; long a = 0; for(int i = 1; i <= 400; i++) { if (i%4==0) { if (1 % 400 == 0 || i % 100 != 0) { cnt++; } } cnt++; if (cnt % 7 == 0) a++; } long ans = 0; ans += loop * a; cnt = 0; for(int i = 1; i <= amari; i++) { if (i % 4 == 0) { if (1 % 400 == 0 || i % 100 != 0) { cnt++; } } cnt++; if (cnt % 7 == 0) ans++; } Console.WriteLine(ans); } }