#include <bits/stdc++.h>
using namespace std;
int charge(int);
int main ()
{
int y,y2,m,m2,d,d2,num,a,b;
while(cin>>y>>m>>d>>y2>>m2>>d2)
{
num=0,a=0,b=0;
int month[12]={31,28,31,30,31,30,31,31,30,31,30,31};
if(y2>y)
{
swap(y2,y),swap(m2,m),swap(d2,d);
}
else if(m2>m&&y2==y) swap(m2,m),swap(d2,d);
else if(d2>d&&y2==y&&m2==m) swap(d2,d);
for(int i=y2;i<=y-1;i++)
{
if(charge(i)) num+=366;
else num+=365;
//cout<<num<<" ";
}
for(int i=0;i<m2-1;i++) a+=month[i];
if(charge(y2)==1&&m2>2) a++;
a+=d2;
b+=d;
for(int i=0;i<m-1;i++) b+=month[i];
if(charge(y)&&m>2) b++;
num+=b-a;
cout<<num<<endl;
}
}
int charge (int a)
{
if (a%4==0 and a%100!=0 or a%400==0)
{
return 1;
}
else
{
return 0;
}
}