#include <iostream>
#include <fstream>
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <sstream>
#include <string>
#include <vector>
using namespace std;

#define EPS 1e-9
#define INF MOD
#define MOD 1000000007LL
#define fir first
#define iss istringstream
#define sst stringstream
#define ite iterator
#define ll long long
#define mp make_pair
#define rep(i,n) rep2(i,0,n)
#define rep2(i,m,n) for(int i=m;i<n;i++)
#define pi pair<int,int>
#define pb push_back
#define sec second
#define sh(i) (1LL<<i)
#define sz size()
#define vi vector<int>
#define vc vector
#define vl vector<ll>
#define vs vector<string>

int Y1,m1,d1,y2,m2,d2,m[]={0,31,28,31,30,31,30,31,31,30,31,30,31};

int main(){
	while(cin>>Y1>>m1>>d1>>y2>>m2>>d2){
		if(Y1<0||m1<0||d1<0||y2<0||m2<0||d2<0)return 0;
		int a=0;
		while(Y1!=y2||m1!=m2||d1!=d2){
			d1++;
			if(d1==m[m1]+1+(m1==2&&(Y1%4==0&&Y1%100!=0||Y1%400==0)))m1++,d1=1;
			if(m1==13)Y1++,m1=1;
			a++;
		}
		cout<<a<<endl;
	}
}