#include<stdio.h>
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;

int main(){
	int x=28;
	int W=365;
	int cal[13]={0,31,x,31,30,31,30,31,31,30,31,30,31};
	int cal2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
	int y1,m1,d1,y2,m2,d2;
	bool F=false;
	while(1){F=false;
		int ans=0;
		cin>>y1>>m1>>d1>>y2>>m2>>d2;if(y1<0||m1<0||d1<0||y2<0||m2<0||d2<0)break;
		if(y1!=y2){
			if(y1%4==0)F=true;
			if(y1%100==0)F=false;
			if(y1%400==0)F=true;

			if(F==false)cal[2]=28;
			else cal[2]=29;
			ans+=cal[m1]-d1+1;
			//cout<<ans<<endl;
			for(int i=m1+1;i<=12;i++)
			{ans+=cal[i];
			//cout<<ans<<endl;
			}
			d1=1;m1=1;y1++;
			//cout<<ans<<endl;
		}
		while(y1!=y2){F=false;
				if(y1%4==0)F=true;
			if(y1%100==0)F=false;
			if(y1%400==0)F=true;
			if(F==false)W=365;
			else  W=366;
			ans+=W;
			y1++;
			//cout<<ans<<endl;
		}
		while(m1!=m2){
			for(int i=m1;i<m2;i++)
				ans+=cal[i];
			m1=m2;
		}
		ans+=d2-d1;
		cout<<ans<<endl;
	}
	return 0;
}

			