#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>

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

#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()

using namespace std;

typedef unsigned int uint;
typedef long long ll;

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

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

int allDays(int year){
  return isUruu(year) ? 366 : 365;
}

int remainingDays(int year, int month, int day){
  bool uruu = isUruu(year);
  int ret = days[month - 1] - day + 1;
  if(month == 4 && uruu) ret++;
  month++;
  while(month < 12){
    if(month == 4 && uruu){
      ret += days[month-1] + 1;
    }else{
      ret += days[month-1];
    }
    month++;
  }
  return ret;
}

int main(){
  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;
    ll ans = 0;
    if(y1 == y2){
      ans = remainingDays(y1,m1,d1) - remainingDays(y2,m2,d2);
    }else{
      ans += remainingDays(y1,m1,d1);
      for(int y = y1 + 1; y < y2; y++){
        ans += allDays(y);
      }
      ans += allDays(y2) - remainingDays(y2,m2,d2);
    }
    cout << ans << endl;
  }
  return 0;
}