#include <iostream>

using namespace std;

int main() {
    int i,year1,year2,month1,month2,day1,day2,someday=0;
    int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};

    while(1){
        cin >> year1 >> month1 >> day1 >> year2 >> month2 >> day2;
        if(year1 == -1 || year2 == -1 || month1 ==-1 || month2 == -1 || day1 == -1 || day2==-1){
            break;
        }

        someday=0;

        if(year1 % 4 == 0 || year2 % 4 == 0){
            if(year1 % 100 == 0 || year2 % 100 == 0){
                if(year1 % 400 == 0 || year2 % 400 == 0){
                    someday += ((year2 - year1) * 365 + 1 + (year2 - year1) / 4);
                }
                else {
                    someday += ((year2 - year1) * 365 + (year2 - year1) / 4);
                }
            }
            else {
                someday += ((year2 - year1) * 365 + 1 + (year2 - year1) / 4);
            }
        }
        else{
            someday += ((year2 - year1) * 365 + (year2 - year1) / 4);
        }

        if(year2 > year1 && month2 < month1){
            if(year1 % 4 == 0 || year2 % 4 == 0){
                if(year1 % 100 == 0 || year2 % 100 == 0){
                    if(year1 % 400 == 0 || year2 % 400 == 0){
                        someday -= 366;
                    }
                    else {
                        someday -= 365;
                    }
                }
                else {
                    someday -= 366;
                }
            }
            else{
                someday -= 365;
            }
            
        }
        
        if(month1 == month2){
            someday += day2 - day1;  
        }
        else if(month1 < month2){
            for(i=1;i<month2 - month1;i++){
                someday += month[month1 + i];
            }
            someday += month[month1] - day1 + day2;
        }
        else {
            for(i=1;i<month2 - month1 + 12;i++){
                if(month1 + i > 12){
                    someday += month[month1 + i -12];
                }
                else {
                    someday += month[month1 + i];
                }
            }
             someday += month[month1] - day1 + day2;
        }

        if(year2 - year1 >= 4){
            someday -= 1;
        }

        cout << someday << endl;
        
    }

    return 0;
}