#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <queue>
#include <vector>
#include <sstream>
#include <functional>
using namespace std;
int month[12]={30,28,31,30,31,30,31,31,30,31,30,31};
int count(int y,int m,int d){//1/1/1~y/m/d?????\??°(1/1/1=1)
	int num=0;
	if((!(y%4)&&(y%100))||(!(y%400)))month[1]=29;
	for(int i=0;i<m-1;i++){
		num+=month[i];
	}
	num+=d;
	month[1]=28;
	return num;
}
int main()
{
	int y1,m1,d1,y2,m2,d2;
	while(cin>>y1>>m1>>d1>>y2>>m2>>d2){
		if(y1<0||m1<0||d1<0||y2<0||m2<0||d2<0)break;
		int ans=0;
		if(y1==y2){
			ans=count(y2,m2,d2)-count(y1,m1,d1);
		}else if(y2-y1==1){
			ans=365-count(y1,m1,d1)+count(y2,m2,d2);
			if((!(y1%4)&&(y1%100))||(!(y1%400)))ans++;
		}else{
			y1++;y2--;
			ans+=(y2-y1+1)*365+(y2/4-y2/100+y2/400)-((y1-1)/4-(y1-1)/100+(y1-1)/400);
			ans+=count(++y2,m2,d2)+365-count(--y1,m1,d1);
			if((!(y1%4)&&(y1%100))||(!(y1%400)))ans++;
		}
		cout<<ans<<endl;

	}
    return 0;
}