#include<vector>
#include<list>
#include<algorithm>
#include<iostream>
#include<string>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
using namespace std;
int f(int y){
  if(y%4)
    return 0;
  else if(y%100)
    return 1;
  else if(y%400)
    return 0;
  else
    return 1;
}
int main(){
  int i;
  int y1,m1,d1,y2,m2,d2,c;
  int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
  for(;;){
    cin>>y1>>m1>>d1>>y2>>m2>>d2;
    if(y1==-1||m1==-1||d1==-1||y2==-1||m2==-1||d2==-1)
      break;
    c=0;
    if(y1==y2){
      if(m1==m2)
	c=d2-d1;
      else{
	c+=a[m1]-d1+1+(m1==2&&f(y1));
	c+=d2-1;
	for(i=m1+1;i<m2;i++)
	  c+=a[i]+(i==2&&f(y1));
      }
    }else{
      c+=a[m1]-d1+1+(m1==2&&f(y1));
      c+=d2-1;
      for(i=m1+1;i<13;i++)
	c+=a[i]+(i==2&&f(y1));
      for(i=1;i<m2;i++)
	c+=a[i]+(i==2&&f(y2));
      for(i=y1+1;i<y2;i++)
	c+=365+f(i);
    }
    cout<<c<<endl;
  }
  return 0;
}