import std.stdio;
import std.algorithm;
import std.string;
import std.functional;
import std.array;
import std.conv;
import std.math;
import std.typecons;
import std.regex;
import std.range;

long[] m = [31,28,31,30,31,30,31,31,30,31,30,31];

void main(){

    while(true){
	auto s = readln().split().to!(long[]);
	if(s[0] < 0 || s[1] < 0 || s[2] <0 || s[3] < 0 || s[4] < 0 || s[5] < 0){
	    break;
	}
	long ans;
	bool lp1 = s[0] % 4 == 0 && (s[0] % 100 != 0 || ( s[0] % 100 == 0 && s[0] % 400 == 0));
	bool lp2 = s[3] % 4 == 0 && (s[3] % 100 != 0 || ( s[3] % 100 == 0 && s[3] % 400 == 0));
	if(s[0] == s[3]){
	    if(s[1] == s[4]){
		ans += s[5] - s[2];
	    }else{
		ans+=m[s[1]-1] - s[2];
		for(long i=s[1]+1;i<=s[4]-1;i++){
		    ans += m[i-1];
		}
		ans+=s[5];
		if(s[1] <= 2 && lp1 && 2 < s[4]) ans++;
	    }
	}else{
	    ans =  (s[3] - s[0] - 1) * 365;
	    for(long i=s[0]+1;i<=s[3]-1;i++){
		if(i%4==0 && ( i%100!=0 || (i%100==0 &&i%400==0))) ans++;
	    }
	    /*
	    ans += (s[3]-1) / 4 - (s[3]-1) / 100 + (s[3]-1) / 400;
	    ans -= (s[0]+1) / 4 - (s[0]+1) /100 + (s[0]+1) / 400;
	    if((s[0]+1) % 4 == 0 && ((s[0]+1) % 100 != 0 || ( (s[0]+1) % 100 == 0 && (s[0]+1) % 400 == 0))) ans--;
	    */
	    for(long i=s[1]+1;i<=12;i++){
		if(lp1 && i == 2) ans += 1;
		ans += m[i-1];
	    }
	    ans += m[s[1]-1] - s[2];
	    for(long i=1;i<s[4];i++){
		if(lp2 && i == 2) ans += 1;
		ans += m[i-1];
	    }
	    ans += s[5];
	}
	ans.writeln();
    }
}