#include<iostream>
using namespace std;

int uru(int y){
	if(y%4==0){
		if(y%100==0){
			if(y%400==0){
				return 1;
			}
			return 0;
		}
		return 1;
	}
	return 0;
}
	


int main(){
	int m[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	int y1,m1,d1;
	int y2,m2,d2;
	int sum;
	while(cin>>y1>>m1>>d1>>y2>>m2>>d2){
		if(y1<0&&m1<0&&d1<0)break;
		if(y2<0&&m2<0&&d2<0)break;
		sum=0;
		
		for(int i=y1;i<y2;i++){
			sum+=365+uru(i);
			//cout<<"a";
			}
		for(int i=m1;i<m2;i++){
			sum+=m[i];
			if(i==2)sum+=uru(y1);
			//cout<<"b";
			
		}		
	
		sum+=d2-d1;
		cout<<sum<<endl;
	}
}