#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int dm[2][12]={{31,28,31,30,31,30,31,31,30,31,30,31},
                    {31,29,31,30,31,30,31,31,30,31,30,31}};
int cnv(int y,int m,int d){
    bool uru[4000]={0};
    for(int i=1;i<4000;i++){
        if(i%4==0)uru[i]=true;
        if(i%100==0)uru[i]=false;
        if(i%400==0)uru[i]=true;
    }
    int D=0;
    for(int i=1;i<y;i++)
        D+=(uru[i])?366:365;

    for(int i=0;i<m;i++)
        D+=dm[uru[y]][i];
    D+=d;
    return D;
}
int main(){
   int y1,m1,d1,y2,m2,d2;
   while(cin>>y1>>m1>>d1>>y2>>m2>>d2){
        if(y1==-1)return 0;
        cout<<cnv(y2,m2,d2)-cnv(y1,m1,d1)<<endl;
   }
}