#include <iostream>
using namespace std;

bool is_uruu(int y){
	if(y % 4 == 0){
		if(y % 100 == 0){
			if(y % 400 == 0) return true;
			else return false;
		}else return true;
	}else return false;
}

int main(){
	int month[] = {31,28,31,30,31,30,31,31,30,31,30,31};
	int a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f,a >= 0){
		int x = c,y = f;
		for(int i = 0;i < a;i++){
			if(is_uruu(i)) x += 366;
			else x += 365;
		}
		for(int i = 0;i < d;i++){
			if(is_uruu(i)) y += 366;
			else y += 365;
		}
		for(int i = 0;i < b - 1;i++){
			if(i == 1 && is_uruu(a)) x += 29;
			else x += month[i];
		}
		for(int i = 0;i < e - 1;i++){
			if(i == 1 && is_uruu(d)) y += 29;
			else y += month[i];
		}
		cout << y - x << endl;
	}
	return 0;
}