#include <iostream>

using namespace std;
int month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31,30, 31};

void solve()
{
	int y[2], m[2], d[2];
	while(cin >> y[0] >> m[0] >> d[0] >> y[1] >> m[1] >> d[1])
	{
		if(y[0] < 0 || m[0] < 0 || d[0] < 0 || y[1] < 0 || m[1] < 0 || d[1] < 0)
		{
			break;
		}
		int count[2] = {0, 0};
		for(int a = 0; a < 2; ++a)
		{
			for(int i = 0; i < y[a]; ++i)
			{
				if(i % 400 == 0 || (i % 100 != 0 && i % 4 == 0))
				{
					count[a]++;
				}
			}
		}
		for(int i = 0; i < 2; ++i)
		{
			y[i]--;
			m[i]--;
			d[i]--;
		}
		
		int day[2] = {0, 0};
		for(int a = 0; a < 2; ++a)
		{
			day[a] = y[a] * 365 + count[a] + d[a];
			for(int i = 0; i < m[a]; ++i)
			{
				day[a] += month[i];
			}
		}
		cout << day[1] - day[0] << endl;
	}
}

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