#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>
#include <fstream>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 10e15+9
#define EPS 1e-10
#define MAX_N 100100
#define MAX_M 100100

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;
typedef pair<P, char> PC;

ll table[2][12] = { { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30 ,31}
, { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30.31 } };

ll solve(ll y, ll m, ll d){
	ll res = 0, year = y;
	y--;
	res += (y / 400) * 146097;
	y %= 400;
	res += (y / 100) * 36524;
	y %= 100;
	res += (y / 4) * 1461;
	y %= 4;
	res += y * 365;
	if (year % 4 == 0){
		if (year % 400 != 0 && year % 100 == 0){
			REP(i, m - 1)res += table[0][i];
		}
		else{
			REP(i, m - 1)res += table[1][i];
		}
	}
	else{
		REP(i, m - 1)res += table[0][i];
	}
	res += d;
	return res;
}

int main(){
	ll a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f){
		if (a < 0 || b < 0 || c < 0 || d < 0 || e < 0 || f < 0)break;
		cout << solve(d, e, f) - solve(a, b, c) << endl;
	}
}