package _0087; import java.time.DayOfWeek; import java.time.LocalDate; import java.util.Scanner; import java.util.stream.IntStream; public class Main { public static void main(String[] args) { Scanner stdin = new Scanner(System.in); int n = stdin.nextInt(); int month = 7; int day = 23; DayOfWeek first = LocalDate.of(2014, month, day).getDayOfWeek(); long ans = IntStream.rangeClosed(2015, n) .mapToObj(year -> LocalDate.of(year, month, day).getDayOfWeek()) .filter(dayOfWeek -> dayOfWeek == first) .count(); System.out.println(ans); } }