import java.time.LocalDate; import java.time.temporal.ChronoUnit; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()){ LocalDate date1 = getDate(scanner.next()); LocalDate date2 = getDate(scanner.next()); System.out.println(date1.until(date2, ChronoUnit.DAYS)+1); } } static LocalDate getDate(String s){ String year = s.substring(0, 4); String month = s.substring(4, 6); String day = s.substring(6); return LocalDate.of(Integer.parseInt(year),Integer.parseInt(month),Integer.parseInt(day)); } }