#include <iostream>
using namespace std;
int main(){
  int y1,m1,d1,y2,m2,d2,day,i=0;
  int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
  for(;i<12;month[i+1]+=month[i],i++);
  while(true){
    cin>>y1>>m1>>d1>>y2>>m2>>d2;
    if (y1==-1)break;
    day=d2-d1+month[m2-1]-month[m1-1]+(y2-y1)*365;
    if(m2<3)y2--;
    if(m1>2)y1++;
    day+=y2/4-(y1-1)/4-y2/100+(y1-1)/100+y2/400-(y1-1)/400;
    cout<<day<<endl;
  }
  return 0;
}