Go: package main

import (
	"bufio"
		"os"
	"strings"
	"strconv"
		"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		input := strings.Split(scanner.Text(), " ")
		ele_t1 := [3]int{}
		ele_t2 := [3]int{}
		for i := range ele_t1 {
			ele_t1[i], _ = strconv.Atoi(input[i])
			ele_t2[i], _ = strconv.Atoi(input[i+3])
		}
		if ele_t1[0] < 0 || ele_t1[1] < 0 || ele_t1[2] < 0 ||
			ele_t2[0] < 0 || ele_t2[1] < 0 || ele_t2[2] < 0 {
				break
		}
		// t1 := time.Date(ele_t1[0], time.Month(ele_t1[1]), ele_t1[2], 0, 0, 0, 0, time.UTC)
		// t2 := time.Date(ele_t2[0], time.Month(ele_t2[1]), ele_t2[2], 0, 0, 0, 0, time.UTC)
		// diff := t2.Sub(t1)
		// fmt.Printf("%v\n", int64(diff/(time.Hour*24)))
		fmt.Println(ut2jd(ele_t2[0], ele_t2[1], ele_t2[2])-ut2jd(ele_t1[0], ele_t1[1], ele_t1[2]))
	}
}

func ut2jd(year, month, day int) int {
	if month <= 2 {
		year--
		month += 12
	}
	s := 3 + year/4 - year/100 + year/400
	s += 1720994 + year*365 + (month+1)*30 + (month+1)*3/5 + day
	return s
}

C++: #include<iostream>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)

int month[]={
  31,//1
  28,//2
  31,//3
  30,//4
  31,//5
  30,//6
  31,//7
  31,//8
  30,//9
  31,//10
  30,//11
  31//12
};

int day(int y,int m,int d){
  int base = y*365+d;
  REP(i,1,m)base+=month[i];
  int lim = m > 2 ? y+1:y;
  
  REP(i,0,y){
    if ( i %100 == 0){
      if ( i %400 != 0)continue;
      else if ( i %400 == 0)base++;//,cout << i <<" " << y<<m<<d<<endl;
    }else if ( i%4 == 0 )base++;//,cout << i << " " <<y<<m<<d<<endl;
  }
  return base;
}


main(){
  int y1,m1,d1,y2,m2,d2;
  while(cin>>y1>>m1>>d1>>y2>>m2>>d2 ){
    if ( y1 < 0 || m1 < 0 || d1 < 0 || 
	 y2 < 0 || m2 < 0 || d2 < 0)break;
    int a=day(y1,m1,d1),b=day(y2,m2,d2);
    cout << b-a << endl;
  }
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

#include <functional>
#include <cassert>

typedef long long ll;
using namespace std;

#define debug(x) cerr << #x << " = " << x << endl;


#define mod 1000000007 //1e9+7(prime number)
#define INF 1000000000 //1e9
#define LLINF 2000000000000000000LL //2e18
#define SIZE 100010

/* ?\????1??´1???1??\?????????????????\??°?¨???? */
int Fairfield(int y,int m,int d){
  if(m<=2){
    y--;
    m+=12;
  }
  
  int dy = 365*(y - 1);
  int dl = y / 4 - y / 100 + y / 400;
  int dm = (306*m - 324) / 10;
  return dy + dl + dm + d - 1;
}

/* ?????\?¨???? (0??\?????\ - 6????????\)???*/
int Zeller(int y,int m,int d){
  if(m<=2){
    y--;
    m+=12;
  }
  return (y + y/4 - y/100 + y/400 + (13*m + 8)/5 + d)%7;
}

/* ???????????´ */
bool is_uruu(int y) {
  return y % 4 == 0 && (y % 100 != 0 || y % 400 == 0);
}



bool calc(){
  int ya,ma,da,yb,mb,db;

  cin >> ya >> ma >> da >> yb >> mb >> db;

  if(ya == -1) return false;


  cout << Fairfield(yb,mb,db) - Fairfield(ya,ma,da) << endl;

  return true;
}

int main(){

  while(calc());
  
  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
typedef long long ll;

// ¼ïPNPPú©çÌú
ll days(int y, int m, int d) {
  y--;
  ll res = y*365;
  res += (y/4)-(y/100)+(y/400); // [N
  for (int i=1; i<m; i++) {
    res += 31;
    if (i==4||i==6||i==9||i==11) res--;
    if (i==2) {
      res-=3;
      y++;
      if (y%400==0||(y%4==0&&y%100!=0))
        res++;
    }
  }
  return res+d-1;
}

int main() {
  // int y,m,d;
  // while(cin>>y>>m>>d) {
  //   cout << days(y,m,d) << endl;
  // }
  int y1,m1,d1,y2,m2,d2;
  while(cin>>y1>>m1>>d1>>y2>>m2>>d2) {
    if (y1<0||y2<0||m1<0||m2<0||d1<0||d2<0) break;
    cout << days(y2,m2,d2)-days(y1,m1,d1) << endl;
  }
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
#include<stack>
#include<functional>
using namespace std;

int main(){
	int dn[13] = {-1,31,28,31,30,31,30,31,31,30,31,30,31};
	int y1,m1,d1,y2,m2,d2;
	while(cin>>y1>>m1>>d1>>y2>>m2>>d2){
		if(y1<0 || m1<0 || d1<0 || y2<0 || m2<0 || d2<0) break;
		int ans = 0;
		for(int y=y1,m=m1,d=d1;;y++){
			if(y%4==0 && (y%100!=0 || y%400==0)) dn[2] = 29;
			else dn[2] = 28;
			for(;;){
				for(;;){
					if(y==y2 && m==m2 && d==d2) goto OUT;
					ans++;
					if(++d>dn[m]){
						d = 1; break;
					}
				}
				if(++m>12){
					m = 1; break;
				}
			}
		}
		OUT:
		printf("%d\n",ans);
	}
	return 0;
}

C++: #include <bits/stdc++.h>
 
using namespace std;
 
int Fairfield(int y, int m, int d)
{
    if(m <= 2) y--,m += 12;
    return 365*y+y/4-y/100+y/400+153*(m+1)/5+d-428;
}
 
int main()
{
    int y1, m1, d1, y2, m2, d2;
 
    while (1) {
	cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
 
	if (y1 == -1 && m1 == -1 && d1 == -1 && 
            y2 == -1 && m2 == -1 && d2 == -1) break;
	
	cout << Fairfield(y2, m2, d2) - Fairfield(y1, m1, d1) << endl;
    }
    return 0;
}

C++: #include<iostream>
using namespace std;

bool uru(int y){
  if(!(y%400))return true;
  if(!(y%100))return false;
  if(!(y%4))return true;
  return false;
}

int day(int y, int m, int d){
  int res = 0;
  int month[] = {31,0,31,30,31,30,31,31,30,31,30};

  for(int i=2000;i<y;i++){
    if(uru(i))res += 366;
    else res += 365;
  }

  for(int i=0;i<m-1;i++)res += month[i];
  if(m>2){
    if(uru(y))res += 29;
    else res += 28;
  }

  res += d;
  return res;
}

  

int main(){
  int y1,y2,m1,m2,d1,d2;

  while(1){
    cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
    if(y1<0 || m1<0 || d1<0 || y2<0 || m2<0 || d2<0)break;

    int s1,s2;
    s1 = day(y1,m1,d1);
    s2 = day(y2,m2,d2);
    cout << s2 - s1 << endl;
  }
}

C++: #include <iostream>

using namespace std;

int main() {
    int day[] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
    int y1, m1, d1, y2, m2, d2;
    while (cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2) {
        if (y1 < 0 || m1 < 0 || d1 < 0 || y2 < 0 || m2 < 0 || d2 < 0) {
            break;
        }
        int ans = 0;
        bool success = false;
        for (int i = y1, j = m1, k = d1; i <= y2; i++) {
            for (j; j <= 12; j++) {
                for (k; k <= day[j]; k++) {
                    if (i == y2 && j == m2 && k == d2) {
                        success = true;
                        break;
                    }
                    ans++;
                }
                if (success == true) {
                    break;
                }
                k = 1;
            }
            if (success == true) {
                break;
            }
            j = 1;
            if (i % 100 == 0) {
                if (i % 400 == 0) {
                    ans++;
                }
            }
            else if (i % 4 == 0) {
                ans++;
            }
        }
        cout << ans << endl;
    }
    return 0;
}

C++: #include <iostream>
using namespace std;

bool isLeap(int y){
	if(y % 4 != 0 || (y % 100 == 0 && y % 400 != 0))
		return false;
	return true;
}

int toDay(int y,int m,int d){
	int res = d;

	res += (y-1) * 365;
	for(int i=4;i<y;i+=4){
		if(isLeap(i)) res++;
	}

	for(int i=1;i<m;i++){
		switch(i){
		case 2:
			if(isLeap(y)) res += 29;
			else res += 28;
			break;
		case 4:
		case 6:
		case 9:
		case 12:
			res += 30;
			break;
		default:
			res += 31;
			break;
		}
	}

	return res;
}

int main(void){
	int y1,m1,d1,y2,m2,d2;

	while(cin>>y1>>m1>>d1>>y2>>m2>>d2 && y1!=-1){
		cout<<toDay(y2,m2,d2) - toDay(y1,m1,d1)<<endl;
	}

	return 0;
}