#include <iostream>
#define IF(i) if(i%400==0||(i%100&&i%4==0))
using namespace std;
int c(int y,int m,int d)
{
	int ct=(m-1)*30+d;
	for(int i=1;i<m;i++) if(!(i==2||i==4||i==6||i==9|i==11)) ct++;
	if(m>2){
		IF(y) ct--;
		else ct-=2;
	}
	return(ct);
}
int main()
{
	int i;
	int y1,m1,d1,y2,m2,d2;
	while (cin>>y1>>m1>>d1>>y2>>m2>>d2){
		if(y1<0) break;
		int o=(y2-y1)*365;
		for (i=y1;i<y2;i++) IF(i) o+=1;
		o = o - c(y1,m1,d1) + c(y2,m2,d2);
		cout << o << endl;
	}
	return 0;
}