import std.stdio;
import std.datetime;

int[] day = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];

void main(){
	int y0, m0, d0, y1, m1 ,d1, ans;
	while (readf("%d %d %d %d %d %d\n", &y0, &m0, &d0, &y1, &m1, &d1), y0 != -1) {
		ans = 0;
		// year
		while (y0 < y1) {
			ans += 365;
			if (yearIsLeapYear(y0++)) ans++;
		}
		// month
		while (m0 < m1) ans += day[m0++];
		// day
		ans += d1 - d0;
		writeln(ans);
	}
}