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.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;
import java.util.Scanner;
public class Main {
	static PrintWriter out = new PrintWriter(System.out);
	static Scanner stdIn = new Scanner(System.in);
	static FastScanner sc = new FastScanner();
	
	static int[] X1 = new int[] {32,30,32,31,31,32,32,31,32,31,32,32};
	static int[] X2 = new int[] {32,29,32,31,31,32,32,31,32,31,32,32};
	
	static int[] day = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
    static int[] month = {0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
	
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		FastScanner sc = new FastScanner();
		while(true) {
			int y1 = sc.nextInt();
			int m1 = sc.nextInt();
			int d1 = sc.nextInt();
			int y2 = sc.nextInt();
			int m2 = sc.nextInt();
			int d2 = sc.nextInt();
			
			if(y1 < 0 || m1 < 0 || d1 < 0 || y2 < 0 || m2 < 0 || d2 < 0) {
				break;
			}
			
			int count = count(y2,m2,d2) - count(y1,m1,d1) ;

			out.println(count);
		}
		out.flush();
		
		
	}
	static boolean is_uruu(Long a) {
		return(a % 4 == 0 && (a % 100 != 0 || a % 400 == 0));
	}
	
	static public int count(int y, int m, int d){
        int num = month[m] + d; 
        if( (y%4 == 0 && y%100 != 0) || y%400 == 0 ){
            if( m > 2 ){
                num++;
            }
        }
        num += y*365 + (y-1)/4 +1 - (y-1)/100 + (y-1)/400;
        if( y == 0 ){
            num--;
        }
        return num;
    }
}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    private void skipUnprintable() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}
    public boolean hasNext() { skipUnprintable(); return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
     
    public int nextInt() {
        return (int)nextLong();
    }
     
    public double nextDouble() {
        return Double.parseDouble(next());
    }
     
 
}