#include<stdio.h>
int m[12]={31,28,31,30,31,30,31,31,30,31,30,31};
int main(){
	int a,b,c,d,e,f;
	while(1){
		scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f);
		if(a<0||b<0||c<0||d<0||e<0||f<0)break;
		a--;
		d--;
		int one=a*365+a/4-a/100+a/400;
		int two=d*365+d/4-d/100+d/400;
		a++;
		d++;
		for(int i=0;i<b-1;i++)one+=m[i];
		for(int i=0;i<e-1;i++)two+=m[i];
		one+=c;
		two+=f;
		if(b>2&&(a%4==0&&((a%100==0&&a%400==0)||a%100)))one++;
		if(e>2&&(d%4==0&&((d%100==0&&d%400==0)||d%100)))two++;
		printf("%d\n",two-one);
	}
}