import java.time.*;
public class Main {
public static void main(String[] args) {
LocalDate startDate = LocalDate.of(2000, 1, 1);
LocalDate endDate = LocalDate.of(2020, 10, 1);
int totalDistance = calculateTotalDistance(startDate, endDate);
System.out.println(totalDistance);
}
public static int calculateTotalDistance(LocalDate startDate, LocalDate endDate) {
int totalDistance = 0;
LocalDate currentDate = startDate;
while (!currentDate.isAfter(endDate)) {
if (currentDate.getDayOfWeek().getValue() == 1 || currentDate.getDayOfMonth() == 1) {
totalDistance += 2;
} else {
totalDistance += 1;
}
currentDate = currentDate.plusDays(1);
}
return totalDistance;
}
}