#include <iostream>

using namespace std;

static int month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

int uruu(int y, int day)
{
	if (y % 4 == 0 && y % 100 != 0 || y % 400 == 0){
		day++;
	}
	return (day);
}

int main()
{
	int y1, y2, m1, m2, d1, d2;
	
	while (cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2){
		int day = 0;
		for (int i = y1; i < y2; i++){
			day = uruu(i, day);
		}
		day += (y2 - y1) * 365;
		for (int i = m1 + 1; i < m2; i++){
			day += month[i];
		}
		if (m1 == m2){
			day += (d2 -d1);
		}
		else {
			day += month[m1] - d1 + d2;
		}
		cout << day << endl;
	}
	return (0);
}