Create a program that takes two dates as input and outputs the number of days between the two dates.

Date 1 (y1, m1, d1) is the same as or earlier than date 2 (y2, m2, d2). Date 1 is included in the number of days, not date 2. Also, take the leap year into account when calculating. The leap year conditions are as follows.

* The year is divisible by 4.
* However, a year divisible by 100 is not a leap year.
* However, a year divisible by 400 is a leap year.



Input

Given multiple datasets. The format of each dataset is as follows:


y1 m1 d1 y2 m2 d2


When any of y1, m1, d1, y2, m2, and d2 is a negative number, the input ends.

The number of datasets does not exceed 50.

Output

Output the number of days on one line for each dataset.

Example

Input

2006 9 2 2006 9 3
2006 9 2 2006 11 11
2004 1 1 2005 1 1
2000 1 1 2006 1 1
2000 1 1 2101 1 1
-1 -1 -1 -1 -1 -1


Output

1
70
366
2192
36890
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
//#include <utility>
#include <set>
#include <iostream>
//#include <memory>
#include <string>
#include <vector>
#include <algorithm>
//#include <functional>
#include <sstream>
//#include <deque>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
//#include <cctype>
#include <cstring>
//#include <ctime>
#include <iterator>
#include <bitset>
//#include <numeric>
//#include <list>
//#include <iomanip>

#if __cplusplus >= 201103L
#include <array>
#include <tuple>
#include <initializer_list>
#include <unordered_set>
#include <unordered_map>
#include <forward_list>

#define cauto const auto&
#else

#endif

using namespace std;


namespace{
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;

#define VV(T) vector<vector< T > >

template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
    v.assign(a, vector<T>(b, t));
}

template <class F, class T>
void convert(const F &f, T &t){
    stringstream ss;
    ss << f;
    ss >> t;
}


#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define F first
#define S second
#define mkp make_pair
#define RALL(v) (v).rbegin(),(v).rend()


#define MOD 1000000007LL
#define EPS 1e-8
static const int INF=1<<24;
int mo[12]={31,28,31,30,31,30,31,31,30,31,30,31};
bool is_leap(int a){
	if(a%400==0) return true;
	if(a%100==0) return false;
	if(a%4==0) return true;
	return false;
}
int foo2(int y1,int m1,int d1,int y2,int m2,int d2){
	int ret=0;
	while(!(y1==y2&&m1==m2&&d1==d2)){
		ret++;
		// int t;
		// cin>>t;
		// cout<<y1<<" "<<m1<<" "<<d1<<endl;
		if(m1==12&&d1==31){
			y1++;
			m1=1;
			d1=1;
		}
		else if(is_leap(y1)&&m1==2){
			if(d1==29){
				m1++;
				d1=1;
			}
			else{
				d1++;
			}
		}
		else if(mo[m1-1]>d1){
			d1++;
		}
		else{
			m1++;
			d1=1;
		}
	}
	return ret;
}
int foo(int y,int m,int d){
	bool f=is_leap(y);
	int ret=0;
	while(m<=12){
		if(m==2&&f){
			ret+=mo[m-1]-d+2;
		}
		else{
			ret+=mo[m-1]-d+1;
		}
		m++;
		d=1;
	}
	// cout<<"ret "<<ret<<endl;
	return ret;
}


void mainmain(){
	vint a(6);
	while(1){
		rep(i,6){
			cin>>a[i];
			if(a[i]==-1) return;
		}
		cout<<foo2(a[0],a[1],a[2],a[3],a[4],a[5])<<endl;
		continue;
		int ans=0;
		if(a[0]==a[3]){
			cout<<-foo(a[3],a[4],a[5])+foo(a[0],a[1],a[2])<<endl;
			continue;
		}
		rep(i,2) ans+=foo(a[0+i*3],a[1+i*3],a[2+i*3]);
		ans-=365;
		if(is_leap(a[3])&&(a[4]==1||a[4]==2)) ans--;
		a[0]++;
		while(a[0]!=a[3]){
			 if(is_leap(a[0])) ans++;
			 ans+=365;
			 a[0]++;
		}
		cout<<ans<<endl;
	}
}



}
int main() try{
    mainmain();
}
catch(...){
}