#include<iostream>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

int main(){
	int cal[100000];
	int month[13];
	month[1]=month[3]=month[5]=month[7]=month[8]=month[10]=month[12]=31;
	month[4]=month[6]=month[9]=month[11]=30;
	loop(i,0,100000){
		if(i%4==0){
			if(i%100==0){
				if(i%400==0){
					cal[i]=1;
				}else cal[i]=0;
			}else cal[i]=1;

		}else cal[i]=0;
	}
	int ay,am,ad,by,bm,bd;
	while(1){
		cin>>ay>>am>>ad>>by>>bm>>bd;
		if(ay<0 || am<0 || ad<0 || by<0 || bm<0 || bd<0)break;
		long long ans=0;
		loop(j,ay+1,by){
			if(cal[j]==1){
				ans+=366;
			}else ans+=365;
		}
		if(ay!=by){
			loop(j,am+1,13){
				if(j==2){
					if(cal[ay]=1)ans+=29;
					else ans+=28;
				}else ans+=month[j];
			}
			loop(j,1,bm){
				if(j==2){
					if(cal[by]==1)ans+=29;
					else ans+=28;
				}else ans+=month[j];
			}
		}else{
			loop(j,am+1,bm){
				if(j==2){
					if(cal[am]==1)ans+=29;
					else ans+=28;
				}else ans+=month[j];
			}
		}
		if(am!=bm){
			ans+=(month[am]-ad);
			ans+=bd;
		}else if(ay==by){
			ans+=(bd-ad);
		}else{
			ans+=(month[am]-ad);
			ans+=bd;
		}
		cout<<ans<<endl;
	}
	return 0;
}