#include <iostream>

using namespace std;

int day(int, int, int);

int main() {

	struct P {
		int y, m, d;
	} a, b;

	while(cin >> a.y >> a.m >> a.d >> b.y >> b.m >> b.d) {
		if(a.y<0) {
			break;
		}
		int d1, d2;
		if(a.m<3) {
			a.m+=12;
			a.y--;
		}
		if(b.m<3) {
			b.m+=12;
			b.y--;
		}
		d1=day(a.y, a.m, a.d);
		d2=day(b.y, b.m, b.d);
		cout << d2-d1 << endl;
	}

	return 0;

}


int day(int y, int m, int d) {
	return (365*y+y/4-y/100+y/400+(306*(m+1))/10+d-428);
}