#include<string>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<complex>
#include<cmath>
#include<algorithm>
#include<map>
#include<vector>
#include<sstream>
#include<iostream>
using namespace std;
const int Lcalendar[] = {366,31,29,31,30,31,30,31,31,30,31,30,31};
const int Ncalendar[] = {365,31,28,31,30,31,30,31,31,30,31,30,31};
long long int GetTotalDays(int y,int m,int d){
    long long int sum = 0;
    sum = y * 365 + ((y-1)/4) - ((y-1)/100) + ((y-1)/400);
    if(y % 4 == 0 &&(y % 400 == 0 || y % 100 != 0)){
        for(int i = 1; i <= m-1; i++)sum += Lcalendar[i];
    }

    else{
        for(int i = 1; i <= m-1; i++) sum += Ncalendar[i];
    }
    sum += d;
    return sum;
}
int main(void){

    int y,m,d,Y,M,D;
    while(cin>>y>>m>>d>>Y>>M>>D,y!=-1)
        cout<<GetTotalDays(Y,M,D) - GetTotalDays(y,m,d)<<endl;

    return 0;
}