#include<stdio.h>
#include<iostream>
using namespace std;

int main(){
int sc[14]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int yd=365;
int y1,y2,m1,m2,d1,d2;
bool f=false;
while(1){
	bool FB=false;
cin>>y1>>m1>>d1>>y2>>m2>>d2;
if(y1<0||y2<0||m1<0||m2<0||d1<0||d2<0)break;
int by=y1;
int ay=y2;
int dc=0;
if((by%4==0&&by%100!=0)||by%400==0){f=true;sc[2]=29;}

if(by!=ay){
for(int i=m1;i<=12;i++)
dc+=sc[i];
dc-=d1;FB=true;
by++;

for(int i=by;i<ay;i++){
if((i%4==0&&i%100!=0)||by%400==0)dc+=366;
else {dc+=365;}
}
by=ay;
m1=1;d1=1;
}
if((by%4==0&&by%100!=0)||by%400==0){f=true;sc[2]=29;}
else sc[2]=28;
for(int i=m1;i<m2;i++)
dc+=sc[i];

dc+=d2;
if(FB==false)dc-=d1;
cout<<dc<<endl;
}
return 0;
}