#include <iostream>
int y;
int m;
int d;
int num;
};
bool leapyear(int x)
{
if(x%400==0||(x%100!=0&&x%4==0)) return true;
else return false;
}
int getdate(int y,int m,int d)
{
int day=0;
int leapyearday=0;
int j;
for(j=1900;j<=y;j++)
{
if(leapyear(j)) leapyearday++;
}
day+=(j-1)*365+leapyearday;
for(int i=1;i<m;i++)
{
switch(i)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
day+=31;
break;
case 2:
{
if(leapyear(y)) day+=29;
else day+=28;
break;
}
default :day+=30;
}
}
day+=(d-1);
return day;
}
int main()
{
date d1,d2;
while(1)
{
cin>>d1.y>>d1.m>>d1.d;
cin>>d2.y>>d2.m>>d2.d;
d1.num=getdate(d1.y,d1.m,d1.d);
d2.num=getdate(d2.y,d2.m,d2.d);
cout<<d2.num-d1.num<<endl;
}
}
using namespace std;
struct date
{int y;
int m;
int d;
int num;
};
bool leapyear(int x)
{
if(x%400==0||(x%100!=0&&x%4==0)) return true;
else return false;
}
int getdate(int y,int m,int d)
{
int day=0;
int leapyearday=0;
int j;
for(j=1900;j<=y;j++)
{
if(leapyear(j)) leapyearday++;
}
day+=(j-1)*365+leapyearday;
for(int i=1;i<m;i++)
{
switch(i)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:
day+=31;
break;
case 2:
{
if(leapyear(y)) day+=29;
else day+=28;
break;
}
default :day+=30;
}
}
day+=(d-1);
return day;
}
int main()
{
date d1,d2;
while(1)
{
cin>>d1.y>>d1.m>>d1.d;
cin>>d2.y>>d2.m>>d2.d;
d1.num=getdate(d1.y,d1.m,d1.d);
d2.num=getdate(d2.y,d2.m,d2.d);
cout<<d2.num-d1.num<<endl;
}
}