#include <cstdio>
#include <iostream>
#include <string>
using namespace std;

int main(){
  int i,j,y[2],m[2],d[2],f;
  long long ans;
  while(1){
    f = 0;
    for(i=0;i<2;i++){
      cin >> y[i] >> m[i] >> d[i];
      if(y[i] < 0 || m[i] < 0 || d[i] < 0) f++;
    }
    if(f != 0) break;

    ans = (long long)(y[1] - y[0]) * 365 + (m[1] - m[0]) * 30 + d[1] - d[0];

    if(m[0] <= m[1]){
      for(i=m[0];i<m[1];i++){
	if(i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 10 || i == 12) ans++;
      }
    }
    else{
      for(i=m[0];i<m[1]+12;i++){
	if(i%12 == 1 || i%12 == 3 || i%12 == 5 || i%12 == 7 || i%12 == 8 || i%12 == 10 || i%12 == 0) ans++;
      }
    }

    for(i=y[0];i<=y[1];i++){
      if(i%4 == 0 && (i%400 == 0 || i%100 != 0)){
	if(i == y[0] && m[0] > 2) continue;
	else if(i == y[1] && m[1] <=2) continue;
	ans++;
      }
    }

    cout << ans << endl;

  }
  return 0;
}