
#include <iostream>
using namespace std;

int main(){
    long long days1,days2;
    int y1,m1,d1,y2,m2,d2;
    while(1){
        days1 = 0;
        days2 = 0;
        cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
        if(y1 < 0 || m1 < 0 || d1 < 0 || y2 < 0 || m2 < 0 || d2 < 0) break;
        for(int i=0;i<y1;i++){
            if((i%4 == 0 && i%100 != 0) || i%400 == 0) days1 += 366;
            else days1 += 365;
        }
        for(int i=0;i<y2;i++){
            if((i%4 == 0 && i%100 != 0) || i%400 == 0) days2 += 366;
            else days2 += 365;
        }
        for(int i=1;i<m1;i++){
            switch(i){
                case 4:
                case 6:
                case 9:
                case 11:
                    days1 += 30;
                    break;
                case 2:
                    if((i%4 == 0 && i%100 != 0) || i%400 == 0) days1 += 29;
                    else days1 += 28;
                    break;
                default:
                    days1 += 31;
                    break;
            }
        }
        for(int i=1;i<m2;i++){
            switch(i){
                case 4:
                case 6:
                case 9:
                case 11:
                    days2 += 30;
                    break;
                case 2:
                    if((i%4 == 0 && i%100 != 0) || i%400 == 0) days2 += 29;
                    else days2 += 28;
                    break;
                default:
                    days2 += 31;
                    break;
            }
        }
        days1 += d1;
        days2 += d2;
        cout << days2 - days1 << endl;
    }
}

    