#include <iostream>
using namespace std;

int days[2][12] = {
	{0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334},
	{0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335}
};

int isLeapYear(int y){
	if(y % 400 == 0) return 1;
	if(y % 100 == 0) return 0;
	if(y % 4 == 0) return 1;
	return 0;
}

int main(){
	int y1, m1, d1, y2, m2, d2;
	
	while(cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2, y1 >= 0){
		int sum = 0;
		
		for(int i = y1; i < y2; ++i){
			sum += (isLeapYear(i) ? 366 : 365);
		}
		
		sum += days[isLeapYear(y2)][m2-1] + d2;
		sum -= days[isLeapYear(y1)][m1-1] + d1;	
		
		cout << sum << endl;
	}
	
	return 0;
}