import datetime date = datetime.date(2014, 7, 23) w = date.weekday() ans = 0 n = int(input()) for y in range(2015, n + 1): date = datetime.date(y, 7, 23) if date.weekday() == w: ans += 1 print(ans)