# include <iostream>
using namespace std;
int isleap(int y,int m)
{
if((((y%4==0)&&(y%100!=0))||y%400==0)&&m>=3)
return 1;
else
return 0;
}
int A(int y,int m,int r)
{
int a[]={0,31,59,90,120,151,181,212,243,273,304,334,365};
int sum=0;
sum+=y*365+y/4-y/100+y/400+a[m-1]+isleap(y,m)+r-1;
return sum;
}
int main()
{
int y1,m1,r1,y2,m2,r2;
while(cin>>y1>>m1>>r1>>y2>>m2>>r2)
{
int s=A(y1,m1,r1)-A(y2,m2,r2);
cout<<s<<endl;
}
return 0;
}
//每个日期与公元元年1月1日的差值
//Y年到公元元年差Y-1年年上的差值为sum=(Y-1)*365
//完后再判断月只需判断有几个闰年sum+=(Y-1)/4-(Y-1)/100+(Y-1)/400
//在判断m>2?加1:加0;(闰年)
//再计算日的差值sum+=d-1;