#!/usr/bin/env python3 # %% import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines from datetime import datetime # %% N = int(read()) # %% answer = 0 if N > 2800: n = N // 2800 - 1 N -= 2800 * n answer += 400 * n today = datetime(2014, 7, 23) for year in range(2015, N + 1): day = datetime(year, 7, 23) if day.weekday() == today.weekday(): answer += 1 # %% print(answer)