#include<iostream>

using namespace std;

typedef struct{
  int y;
  int m;
  int d;
}Info;
typedef long long ll;

Info in[2];

int toY(int in){
  if(in%4) return 365;
  if(in%400 && in%100 == 0) return 365;
  return 366;
}

int toM(int in,int year){
  if(in == 2){
    if(toY(year) == 366) return 29;
    else return 28;
  }
  if(in == 4 || in == 6 || in == 9 || in == 11) return 30;
  return 31;
}

int toD(Info info){
  ll sum = 0;
  for(int i = 1; i < info.y; i++) sum += toY(i);
  for(int i = 1; i < info.m; i++) sum += toM(i,info.y);
  sum += info.d;
  return sum;
}

int main(){
  while(1){
    cin >> in[0].y >> in[0].m >> in[0].d;
    cin >> in[1].y >> in[1].m >> in[1].d;
    for(int i = 0; i < 2; i++){
      if(in[i].y < 0 || in[i].m < 0 || in[i].d < 0) return 0;
    }
    cout << toD(in[1])-toD(in[0]) << endl;
  }
}