Go: package main

import (
	"bufio"
		"os"
	"strings"
	"strconv"
	"time"
	"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)))
	}
}

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

int main() {
	int y,m,d,Y,M,D,i,b,c,yday,mday,day;
	int sum,n,uru,nuru;
	for(;;){
		
		if(y==-1||m==-1||d==-1||Y==-1||M==-1||y==-1){
			break;
		}
		
		
	
	cin>>y>>m>>d>>Y>>M>>D;
	
	
	
	
	yday=(Y-y)*365;
	mday=(M-m)*30;
	day=D-d;
	uru=(Y-y)/4;
	if(y%4==0){
		uru=uru+1;
	}
	if(1900<=y&&Y>=2000){
		uru=uru-1;
	}if(2000<=y&&Y>=2100){
		uru=uru-1;
	}if(2100<=y&&Y>=2200){
		uru=uru-1;
	}if(2200<=y&&Y>=2300){
		uru=uru-1;
	}if(2400<=y&&Y>=2500){
		uru=uru-1;
	}if(2500<=y&&Y>=2600){
		uru=uru-1;
	}if(2600<=y&&Y>=2700){
		uru=uru-1;
	}if(2800<=y&&Y>=2900){
		uru=uru-1;
	}if(2900<=y&&Y>=3000){
		uru=uru-1;
	}
	
	sum=yday+mday+day+uru;
	
	if(m<=2&&2<=M&&m!=M){
		sum+=1;
	}
	if(m<=4&&4<=M&&m!=M){
		sum+=1;
	}
	if(m<=6&&6<=M&&m!=M){
		sum+=1;
	}
	if(m<=9&&9<=M&&m!=M){
		sum+=1;
	}
	if(m<=12&&12<=M&&m!=M){
		sum+=1;
	}
	
	
	if(Y%400==0&&y%400==0&&Y!=y){
		
		sum=sum+1;
	}
	
	if(sum!=0){
	printf("%d\n",sum);
	}
}
	return 0;
}

C++: #include <iostream>
#define IF(i) if(i%400==0|(i%100&&i%4==0))
using namespace std;
int c(int y,int m,int d)
{
	int ct=(m-1)*30+d;
	for(int i=1;i<m;i++) if(!(i==2|i==4|i==6|i==9|i==11)) ct++;
	if(m>2){
		IF(y) ct--;
		else ct-=2;
	}
	return(ct);
}
int main()
{
	int i;
	int y1,m1,d1,y2,m2,d2;
	while (cin>>y1>>m1>>d1>>y2>>m2>>d2){
		if(y1<0) break;
		int o=(y2-y1)*365;
		for (i=y1;i<y2;i++) IF(i) o+=1;
		o = o - c(y1,m1,d1) + c(y2,m2,d2);
		cout<<o<<endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int conpute( int y,int m, int d ){

  int day = 0;

  for( int i = 1 ; i < y ; i++ ){
    day += 365;
    if( i % 4 == 0 ){
      day++;
    }
    if( i % 100 == 0 ){
      day--;
    }
    if( i % 400 == 0 ){
      day++;
    }
  }
  
for( int i = 1 ; i < m ; i++ ){
    switch(i){

    case 1:
    case 3:
    case 5:
    case 7:
    case 8:
    case 9:
    case 10:
    case 12:
      day += 31;
      break;
    case 2:
      day += 28;
      if( i % 4 == 0 ){
	day++;
      }
      if( i % 100 == 0 ){
	day--;
      }
      if( i % 400 == 0 ){
	day++;
      }
      break;
    case 4:
    case 6:
    case 11:
      day += 30;
      break;
    }
  }
  day += d;
  return day;
}


int main(void){

  int y1,y2;
  int m1,m2;
  int d1,d2;

  while( cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2 ){
    if( y1 == m1 && m1 == d1 && d1 == y2 && y2 == m2 && m2 == d2 && d2 == -1 ){
      break;
    }
    int ans = 0;
    ans = conpute( y2, m2, d2 ) - conpute( y1, m1, d1 );
    cout << ans << endl;
  }
  return 0;
}

C++: #include <cstdio>

bool uruu(int year);

int main(void)
{
    while (1){
        int y1, y2, m1, m2, d1, d2;
        scanf("%d %d %d %d %d %d", &y1, &m1, &d1, &y2, &m2, &d2);
        if (y1 < 0){
            break;
        }
        
        // ツ催渉可づ可禿シツ療債つウツづェツつスツづ「ツづつつェツ暗ェツ年ツづ可スツ禿コツ姪堋つゥ
        int day1 = 0;
        for (int i = 1; i <= m1; i++){
            day1 += 31;
            if (i == 4 || i == 6 || i == 9 || i == 11){
                day1 -= 1;
            }
            if (i == 2){
                day1 -= 3;
                if (uruu(y1)){
                    day1 += 1;
                }
            }
        }
        day1 += d1;
        
        // ツ篠淞づ可禿シツ療債つウツづェツつスツづ「ツづつつェツ暗ェツ年ツづ可スツ禿コツ姪堋つゥ
        int day2 = 0;
        for (int i = 1; i <= m2; i++){
            day2 += 31;
            if (i == 4 || i == 6 || i == 9 || i == 11){
                day2 -= 1;
            }
            if (i == 2){
                day2 -= 3;
                if (uruu(y2)){
                    day2 += 1;
                }
            }
        }
        day2 += d2;
        
        // ツ年ツづ個計ツ算
        int ans = day2 - day1;
        while (y1 != y2){
            if (uruu(y1)) ans += 366;
            else ans += 365;
            y1++;
        }
        
        printf("%d\n", ans);
    }
}

bool uruu(int year)
{
    return (year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0));
}

C++: #include <iostream>
#include <cstdio>
//#include <cstdlib>
#include <cmath>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <set>
#include <queue>
//#include <stack>
//#include <limits>
#include <sstream>
//#include <functional>
#include <complex>
#include <ctime>

using namespace std;

#define len(array)  (sizeof (array) / sizeof *(array))
#define rep(i, s, e) for(int i = s;i < e;i++)
#define rrep(i, e, s) for(int i = e;s <= i;i--)
#define vrange(v) v.begin(), v.end()
#define vrrange(v) v.rbegin(), v.rend()
#define vsort(v) sort(vrange(v))
#define vrsort(v) sort(vrrange(v))
#define arange(a) a, a + len(a)
#define asort(a) sort(arange(a))
#define arsort(a, t) sort(arange(a), greater<t>())
#define afill(a, v) fill(arange(a), v)
#define afill2(a, v, t) fill((t *)a, (t *)(a + len(a)), v)
#define fmax(a, b) (a < b? b : a)
#define fmin(a, b) (a > b? b : a)
#define fabs(a) (a < 0? -a : a)
#define X real()
#define Y imag()
typedef unsigned int ui;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef complex<double> p;
const int INF = (int)1e9;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-10;
//const int dx[] = {1, -1, 0, 0, 1, -1, -1, 1};
//const int dy[] = {0, 0, 1, -1, -1, -1, 1, 1};
//const int weight[] = {0,1,10,100,1000,10000,100000,1000000,10000000};
//priority_queue< int, vector<int>, greater<int> > q;

//struct tm : http://www.tamasoft.co.jp/lc/hlp/F047.html

//閏年ならtrue
bool leap(int y){
  return y % 400 == 0? true : (y % 100 == 0? false : (y % 4 == 0? true : false));
}

void settime(struct tm *t, int y, int m, int d){
  t->tm_sec = 0;
  t->tm_min = 0;
  t->tm_hour = 0;
  t->tm_mday = d;
  t->tm_mon = m-1;
  t->tm_year = y-1900;
  // if(leap(y)) t->tm_yday = 365;
  // else t->tm_yday = 364;
  t->tm_isdst = -1;
  //cout << "yday = " << t->tm_yday << ", isdst = " << t->tm_isdst << endl;
}

int diffdays(struct tm *t1, struct tm *t2){
  double t = difftime(mktime(t1), mktime(t2));
  return fabs(t) / (60*60*24);
}

//AOJ0125
//http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0125
void doIt(){
  int y1,m1,d1,y2,m2,d2;
  struct tm t1, t2;
  int ans;
  while(1){
	cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
	if(y1 < 0) break;
	settime(&t1, y1, m1, d1);
	settime(&t2, y2, m2, d2);
	ans = diffdays(&t1, &t2);
	cout << ans << endl;
  }
}

void test(){
  struct tm t1, t2;
  settime(&t1, 2000, 2, 28);
  settime(&t2, 2000, 3, 1);
  cout << diffdays(&t1, &t2) << endl;
}

int main() {
  doIt();
  //test();
  return 0;
}