#include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<cstdlib>
#include<iomanip>
#include<queue>
#include<set>

using namespace std;

bool isLeap(int year)
{
    if (year % 400 == 0)
    {
        return true;
    }
    
    if (year % 100 == 0)
    {
        return false;
    }
    
    return (year % 4 == 0);
}

long long dateSerial(int year, int month, int day)
{
    static int days[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
    
    long long res = day;
    
    for (int i = 0; i < month - 1; i++)
    {
        res += days[i];
        
        if(isLeap(year) && i == 1)
        {
            res++;
        }
    }
    
    for (int i = 1; i < year; i++)
    {
        res += 365;
       
        if (isLeap(i))
        {
            res++;
        }
    }
    
    return res;
}

void Solution()
{
    int y1, m1, d1, y2, m2, d2;
    
    while (cin>>y1>>m1>>d1>>y2>>m2>>d2)
    {
        if (y1 < 0 || m1 < 0 || d1 < 0 || y2 < 0 || m2 < 0 || d2 < 0)
        {
            break;
        }
        
        long long date1 = dateSerial(y1, m1, d1);
        long long date2 = dateSerial(y2, m2, d2);
        
        cout<<date2 - date1<<endl;
    }
}

int main()
{
    Solution();
    return 0;
}