#include<iostream>
#include<cstring>
#include<ctime>
using namespace std;
class Date{
	int y, m ,d;
public:
	bool GetDate(){
		cin >> y >> m >> d;
		if( y < 0 || m < 0 || d < 0 ) return false;
		else return true;
	}
	static bool isLeap(int y){
		return ( y % 4 == 0 && ( y % 100 != 0 || y % 400 == 0 ) );
	}
	unsigned int days() const {
		unsigned int ret = 0;
		const int md[] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
		for(int ty = 0; ty < y; ++ty){
			ret += isLeap( ty ) ? 366 : 365;
		}
		for(int tm = 1; tm < m; ++tm){
			ret += md[tm];
		}
		ret += d;
		return ret;
	}
	unsigned int operator-(const Date &t) const {
		return this->days() - t.days();
	}
};
int main(void){
	while( true ){
		Date date1, date2;
		if( !date1.GetDate() || !date2.GetDate() )
			break;
		
		cout << date2 - date1 << '\n';
	}
	return 0;
}