#include <iostream>
#include<cstdio>
using namespace std;

int main() {
	int y,m,d,Y,M,D,i,b,c,yday,mday,day;
	int sum,n,uru,nuru;
	for(;;){
		
		if(y==-1||m==-1||d==-1||Y==-1||M==-1||y==-1){
			break;
		}
		
		
	
	cin>>y>>m>>d>>Y>>M>>D;
	
	
	
	
	yday=(Y-y)*365;
	mday=(M-m)*30;
	day=D-d;
	uru=(Y-y)/4;
	if(y%4==0){
		uru=uru+1;
	}
	
	if(1900>y&&Y>=1900){
		uru=uru-1;
	}if(2000>y&&Y>=2000){
		uru=uru-1;
	}if(2100>y&&Y>=2100){
		uru=uru-1;
	}if(2200>y&&Y>=2200){
		uru=uru-1;
	}if(2300>y&&Y>=2300){
		uru=uru-1;
	}if(2400>y&&Y>=2400){
		uru=uru-1;
	}if(2500>y&&Y>=2500){
		uru=uru-1;
	}if(2600>y&&Y>=2600){
		uru=uru-1;
	}if(2700>y&&Y>=2700){
		uru=uru-1;
	}if(2800>y&&Y>=2800){
		uru=uru-1;
	}if(2900>y&&Y>=2900){
		uru=uru-1;
	}
	
	sum=yday+mday+day+uru;
	
	if(m<=2&&2<=M&&m!=M){
		sum+=1;
	}
	if(m<=4&&4<=M&&m!=M){
		sum+=1;
	}
	if(m<=6&&6<=M&&m!=M){
		sum+=1;
	}
	if(m<=9&&9<=M&&m!=M){
		sum+=1;
	}
	if(m<=12&&12<=M&&m!=M){
		sum+=1;
	}
	
	
	if(Y%400==0&&y%400==0&&Y!=y){
		
		sum=sum+1;
	}
	
	if(sum!=0){
	printf("%d\n",sum);
	}
}
	return 0;
}