#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
long y1,m1,d1,y2,m2,d2;
string s[10];
while(cin>>y1>>m1>>d1>>y2>>m2>>d2){
if(y1<0||m1<0|d1<0||y2<0||m2<0||d2<0)break;
if(m1<3){y1--;m1+=12;}
if(m2<3){y2--;m2+=12;}
d1=long(365.25*y1)+y1/400-y1/100+long(30.59*(m1-2))+d1;
d2=long(365.25*y2)+y2/400-y2/100+long(30.59*(m2-2))+d2;
cout<<d2-d1<<endl;
}
return 0;
}