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>
#include<iomanip>
#include<algorithm>
#include<array>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<numeric>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<unordered_map>
#include<queue>
#include<vector>
using namespace std;

//#define int long long
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;

#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(a) (a).begin(),(a).end()
#define dump(o) {cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) {cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3fLL
const int MOD = 1e9 + 7;

//???????????¨????????????smallCheck??????
//offset: <http://fuka5.contest.atcoder.jp/submissions/134493>
struct Date {
	typedef int Integer; Integer offset;
	static const int days[12], dayscumsum[13], dayscumsuml[13];
	struct YMD {
		Integer Y; int M, D;
		YMD(Integer Y_, int M_, int D_) : Y(Y_), M(M_), D(D_) { }
	};
	Date() : offset(0) { }
	explicit Date(Integer offset_) : offset(offset_) { }
	Date(Integer Y, int M, int D) : offset(toOffset(Y, M, D)) { }

	//?????´???
	static bool isLeapYear(Integer Y) {
		return Y % 4 == 0 && (Y % 100 != 0 || Y % 400 == 0);
	}
	//Y??´M????????\??°
	static int getDays(int Y, int M) {
		return days[M - 1] + (M == 2 && isLeapYear(Y));
	}
	static Integer toOffset(int y, int m, int d) {
		if (m <= 2) y--, m += 12;
		return y * 365 + div(y, 4) - div(y, 100) + div(y, 400) + 153 * (m + 1) / 5 + d - 428;
	}
	void getYearMonthDay(Integer &Y, int &M, int &D) const {
		Integer a = offset - 1, quadcent = div(a, 146097);
		Integer b = a - quadcent * 146097, cent = min(b / 36524, Integer(3));
		Integer c = b - cent * 36524, quad = c / 1461;
		Integer d = c - quad * 1461, y = min(d / 365, Integer(3));
		Y = quadcent * 400 + cent * 100 + quad * 4 + y + 1;
		int yd = (int)(d - y * 365 + 1);
		fromOrdinalDate(Y, yd, M, D);
	}
	static void fromOrdinalDate(const Integer &Y, int yd, int &M, int &D) {
		const int *cumsum = isLeapYear(Y) ? dayscumsuml : dayscumsum;
		M = upper_bound(cumsum, cumsum + 13, yd - 1) - cumsum;
		D = yd - cumsum[M - 1];
	}

	Integer getYear() const { Integer Y; int M, D; getYearMonthDay(Y, M, D); return Y; }
	int getMonth() const { Integer Y; int M, D; getYearMonthDay(Y, M, D); return M; }
	int getDay() const { Integer Y; int M, D; getYearMonthDay(Y, M, D); return D; }
	int getDayOfWeek() const { return offset % 7; }

	Date operator+(Integer that) const { return Date(offset + that); }
	Date &operator+=(Integer that) { offset += that; return *this; }
	Integer operator-(const Date &that) const { return offset - that.offset; }

	bool operator==(const Date &that) const { return offset == that.offset; }
	bool operator!=(const Date &that) const { return offset != that.offset; }
	bool operator< (const Date &that) const { return offset <  that.offset; }
	bool operator> (const Date &that) const { return offset >  that.offset; }
	bool operator<=(const Date &that) const { return offset <= that.offset; }
	bool operator>=(const Date &that) const { return offset >= that.offset; }

	friend ostream &operator<<(ostream &o, const Date &that) {
		Date::Integer Y; int M, D; that.getYearMonthDay(Y, M, D);
		return o << Y << "/" << M << "/" << D;
	}
private:
	static inline Integer div(Integer x, int y) { return x / y - (x % y != 0 && x < 0); };
};
const int Date::days[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 };
const int Date::dayscumsum[13] = { 0,31,59,90,120,151,181,212,243,273,304,334,365 };
const int Date::dayscumsuml[13] = { 0,31,60,91,121,152,182,213,244,274,305,335,366 };

signed main() {
	for (int y1, m1, d1, y2, m2, d2; cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2&&y1 != -1;) {
		Date a(y1, m1, d1), b(y2, m2, d2);
		cout << b - a << endl;
	}
	return 0;
}

C++: #include <cstdio>
#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 <complex>
#include <stack>
#include <queue>
#include <cstring>
#include <climits>
using namespace std;
static const double EPS = 1e-5;
typedef long long ll;

int uru(int y){
	return y%4==0 && (y%100!=0 || y%400==0);
}

int day(int y,int m,int d){
	int days=0;
	for(int i=1;i<=y-1;i++)days+=uru(i)+365;
	
	if(m>1)days+=31;
	if(m>2)days+=28+uru(y);
	if(m>3)days+=31;
	if(m>4)days+=30;
	if(m>5)days+=31;
	if(m>6)days+=30;
	if(m>7)days+=31;
	if(m>8)days+=30;
	if(m>9)days+=30;
	if(m>10)days+=31;
	if(m>11)days+=30;
	
	days+=d;
	return days;
}

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;
		
		cout<<day(y2,m2,d2)-day(y1,m1,d1)<<endl;
	}
}