from calendar import weekday day=weekday(2014,7,23) n= int(input()) cnt=0 for i in range(2015,n+1): if day==weekday(i,7,23): cnt+=1 print(cnt)