Create a program that takes two dates as input and outputs the number of days between the two dates.

Date 1 (y1, m1, d1) is the same as or earlier than date 2 (y2, m2, d2). Date 1 is included in the number of days, not date 2. Also, take the leap year into account when calculating. The leap year conditions are as follows.

* The year is divisible by 4.
* However, a year divisible by 100 is not a leap year.
* However, a year divisible by 400 is a leap year.



Input

Given multiple datasets. The format of each dataset is as follows:


y1 m1 d1 y2 m2 d2


When any of y1, m1, d1, y2, m2, and d2 is a negative number, the input ends.

The number of datasets does not exceed 50.

Output

Output the number of days on one line for each dataset.

Example

Input

2006 9 2 2006 9 3
2006 9 2 2006 11 11
2004 1 1 2005 1 1
2000 1 1 2006 1 1
2000 1 1 2101 1 1
-1 -1 -1 -1 -1 -1


Output

1
70
366
2192
36890
import java.util.Scanner;
import java.util.ArrayList;
	
public class Main {
	public static void main(String[] args) {
		Scanner scanline = new Scanner(System.in);
		while(scanline.hasNext()){
			String twoDates = scanline.nextLine();
			Scanner scandate = new Scanner(twoDates);
			int y1 = scandate.nextInt();
			int m1 = scandate.nextInt();
			int d1 = scandate.nextInt();
			int y2= scandate.nextInt();
			int m2 = scandate.nextInt();
			int d2 = scandate.nextInt();
			if(y1<0 || m1<0 || d1<0 || y2<0 || m2<0 || d2<0){
				break;
			}
			int datesInYear;
			if(leapyear(y1)){
				datesInYear = 366;
			}else{
				datesInYear = 365;
			}
			int number1 = countDatesByYMD(y1,m1,d1);
			int number3 = countDatesByYMD(y2,m2,d2);
			int number2 = countDatesByYear(y1,y2);
			int totalDates = - number1 + number2 + number3;
			if(y1==y2){
				System.out.println(""+(number3-number1));
			}
			else if(y2-y1==1){
				System.out.println(""+(datesInYear-number1+number3));
			}
			else{
				System.out.println(""+(totalDates + datesInYear));
			}
		}
	}
	public static int countDatesByYear(int y1,int y2){
		if(y2-y1<=1){
			return 0;
		}else{
			int dates=0;
			int datesInYear;
			for (int i=y1+1;i<y2;i++){
				if(leapyear(i)){
					datesInYear = 366;
				}else{
					datesInYear = 365;
				}
				dates += datesInYear;
			}
			return dates;
		}
	}
	public static int countDatesByYMD(int year,int month,int day){
		int dates=0;
		if(leapyear(year)){
		switch(month){
			case 1:
				dates = day;
				break;
			case 2:
				dates = 31+day;
				break;
			case 3:
				dates = 60+day;
				break;
			case 4:
				dates = 91+day;
				break;
			case 5:
				dates = 121+day;
				break;
			case 6:
				dates = 152+day;
				break;
			case 7:
				dates = 182+day;
				break;
			case 8:
				dates = 213+day;
				break;
			case 9:
				dates = 244+day;
				break;
			case 10:
				dates = 274+day;
				break;
			case 11:
				dates = 305+day;
				break;
			case 12:
				dates = 335+day;
				break;
		}
		}else{
			switch(month){
			case 1:
				dates = day;
				break;
			case 2:
				dates = 31+day;
				break;
			case 3:
				dates = 59+day;
				break;
			case 4:
				dates = 90+day;
				break;
			case 5:
				dates = 120+day;
				break;
			case 6:
				dates = 151+day;
				break;
			case 7:
				dates = 181+day;
				break;
			case 8:
				dates = 212+day;
				break;
			case 9:
				dates = 243+day;
				break;
			case 10:
				dates = 273+day;
				break;
			case 11:
				dates = 304+day;
				break;
			case 12:
				dates = 334+day;
				break;			
		}
		}
		return dates;
	}
	public static boolean leapyear(int year){
		if (year%4 == 0){
			if (year%100 == 0){
				if (year%400 ==0 ){
					return true;
				}
				else{
					return false;
				}
			}else{
				return true;
			}
		}else{
			return false;
		}
	}
}