//10
#include<iostream>

using namespace std;

int dc(int y,int m,int d){
  int cy,cm,cd;
  cy=cm=cd=1;
  int dct=0;
  while(y!=cy||m!=cm||cd!=d){
    dct++;
    cd++;
    static const int dom[][13]={{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}};
    if(cd>dom[cy%400==0||(cy%4==0&&cy%100)][cm]){
      cd=1;
      cm++;
      if(cm>12){
	cm=1;
	cy++;
      }
    }
  }
  return dct;
}

int main(){
  for(int y,m,d,yy,mm,dd;cin>>y>>m>>d>>yy>>mm>>dd,(y|m|d|yy|mm|dd)>=0;){
    cout<<dc(yy,mm,dd)-dc(y,m,d)<<endl;
  }
  return 0;
}