#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<sstream>
#include<numeric>
#include<cassert>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define rep(i,s,n) for(int i=(s); 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()
#define IN(x,s,g) ((x) >= (s) && (x) < (g))
#define ISIN(x,y,w,h) (IN((x),0,(w)) && IN((y),0,(h)))
#define print(x) printf("%d\n",x)

using namespace std;

typedef unsigned int uint;
typedef long long ll;

const int _dx[] = {0,1,0,-1};
const int _dy[] = {-1,0,1,0};

int getInt(){
  int ret = 0,c;
  c = getchar();
  while(!isdigit(c)) c = getchar();
  while(isdigit(c)){
    ret *= 10;
    ret += c - '0';
    c = getchar();
  }
  return ret;
}

int days[2][12] = {
  {
      31,
      30,
      31,
      28,
      31,
      30,
      31,
      31,
      30,
      31,
      30,
      31
  },
  {
      31,
      30,
      31,
      29,
      31,
      30,
      31,
      31,
      30,
      31,
      30,
      31
  }
};

int uruu(int y){
  return (y % 4 == 0 && (y % 400 == 0 || y % 100 != 0)) ? 1 : 0;
}

int day(int y, int m, int d){
  int ret = 0;
  REP(i,y) ret += 365 + uruu(i);
  REP(i,m) ret += days[uruu(y)][i];
  ret += d;
  return ret;
}

int main(){
  int y1, m1, d1, y2, m2, d2;
  while(scanf("%d%d%d%d%d%d",
	      &y1, &m1, &d1, 
	      &y2, &m2, &d2), y1 != -1){
    int h1 = day(y1,m1,d1);
    int h2 = day(y2,m2,d2);
    print(abs(h1 - h2));
  } 
  return 0;
}