#include<iostream>

int leap(int y,bool flag);
int monthday(int m);

int main()
{
	int y1,m1,d1;
	int y2,m2,d2;
	int c1,c2;// Day count from 1/1/1 to y1/m1/d1
	int daycount;

	while(1)
	{
		std::cin>>y1>>m1>>d1>>y2>>m2>>d2;
		if(y1<0||m1<0||d1<0||y2<0||m2<0||d2<0)break;
		
		c1=(y1-1)*365+leap(y1,m1<=2)+monthday(m1)+d1-1;
		c2=(y2-1)*365+leap(y2,m2<=2)+monthday(m2)+d2-1;
		daycount=c2-c1;
		std::cout<<daycount<<std::endl;
	}
	return 0;
}

int leap(int y,bool flag)
{
	int count;
	bool isleap;
	if(y%4==0)
	{
		isleap=true;
		if(y%100==0)
		{
			isleap=false;
			if(y%400==0)isleap=true;
		}
	}
	count=y/4-y/100+y/400;
	if(isleap&&flag)count--;
	return count;
}

int monthday(int m)
{
	int count=0;
	int days[11]={31,28,31,20,31,30,31,31,30,31,30};
	for(int i=0;i<m;i++)
	{
		count+=days[i];
	}
	return count;
}