#include <iostream>
using namespace std;
int main( void )
{
	const int dom[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
	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;

		int uru = 0;
		for ( int i = y1; i < y2; i++ )
		{
			if ( i % 4 == 0 )
			{
				if ( i % 100 != 0 )
				{
					uru ++;
				}
				else if ( i % 400 == 0 )
				{
					uru ++;
				}
			}
		}

		int days = ( y2 - y1 ) * 365 + uru;
		for ( int i = m1; i < m2; i++ )
		{
			days += dom[i];
		}

		days += d2 - d1;

		cout << days << endl;

	}
	return 0;
}