#include <iostream>
using namespace std;

int f(int y,int m,int d){
	const int year = 365;
	int month[] = {31,28,31,30,31,30,31,31,30,31,30,31},c;
	c = 0;
	for(int i = 1;i < y;++i){
		c += year;
		if(i % 100 == 0){ 
			if(i % 400 == 0) ++c;
		}
		else if(i % 4 == 0) ++c; 
	}
	for(int i = 0;i < m - 1;++i){
		c += month[i];
		if(i == 1){
			if(y % 100 == 0){
				if(y % 400 == 0) ++c;
			}
			else if(y % 4 == 0) ++c;
		}
	}
	c += (d - 1);
	return c;
}

int main(){
	int y1,m1,d1,y2,m2,d2;
	while(cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2,d1 > 0){
		cout << f(y2,m2,d2) - f(y1,m1,d1) << endl;
	}
	return 0;
}