#include<iostream>
using namespace std;

int main(){
  while(1){
    int day[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
    int uruday[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
    int i,j,y1,m1,d1,y2,m2,d2;
  int total=0;
  cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
  if(y1<0 || m1<0 || d1<0 || y2<0 || m2<0 || d2<0)break;
  for(i = y1; i < y2; i++){
    if(i%4==0){
      total += 366;
      if(i%100==0)total-=1;
      if(i%400==0)total+=1;
    }
    else total+=365;
  }
  
  for(i = 1; i < m2; i++){
    if(i==2 && (y2%4==0)){
      total+=uruday[i];
      if(y2%100==0)total-=1;
      if(y2%400==0)total+=1;
    }
    else total+=day[i];
  }

  for(i = 1; i < m1; i++){
  if(i==2 && (y2%4==0)){
      total-=uruday[i];
      if(y2%100==0)total+=1;
      if(y2%400==0)total-=1;
    }
    else total-=day[i];
  }
  
  total+=d2-d1;

  cout << total << endl;
  }
  return 0;
}