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 year = N - 2014; long cnt = 0; long loop = year / 400; long amari = year % 400; long a = 0; for(int i = 2014+1; i <=2014+ 400; i++) { if (i % 4 == 0 && i % 100 != 0 || i % 400 == 0) { cnt++; } cnt++; if (cnt % 7 == 0) { a++; } } long ans = a * loop; for(int i = 2014 + 1; i <= amari + 2014; i++) { if (i % 4 == 0 && i % 100 != 0 || i % 400 == 0) { cnt++; } cnt++; if (cnt % 7 == 0) ans++; } Console.WriteLine(ans); } }