#include<iostream>
using namespace std;

int main()
{
  int y1,m1,d1,y2,m2,d2;
  int m[12]={31,28,31,30,31,30,31,31,30,31,30,31},i;
  int days1,days2,difference;
  for(i=1;i<12;i++)m[i]+=m[i-1];
  while(cin>>y1>>m1>>d1>>y2>>m2>>d2,~y1&~m1&~d1&~y2&~m2&~d2){
    days1=365*y1+m[m1-1]+d1+y1/4-y1/100+y1/400;
    days2=365*y2+m[m2-1]+d2+y2/4-y2/100+y2/400;
    difference=days2-days1;
    if( (y1%4==0 && y1%100!=0) || (y1%400==0) ){
      if(m1==2&&d1==29){
      }else if(m1<=2){
	difference++;
      }
    }
    if( (y2%4==0 && y2%100!=0) || (y2%400==0) ){
      if(m2==2&&d2==29){
	difference++;
      }else if(m2>=3){
	difference++;
      }
    }
    cout<<difference<<endl;
  }
}