#include<iostream>
using namespace std;

int main(){

  long long int y1,m1,d1,y2,m2,d2;
  long long int ans = 0;
  int m[] = {31,28,31,30,31,30,31,31,30,31,30,31};

  while(true){
    cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
    if(y1 < 0 || m1 < 0 || d1 < 0 || y2 < 0 || m2 < 0 || d2 < 0) break;

    ans = 0;
    for(int i=y1;i<y2;i++){
      ans += 365;
      if(i%400 == 0 || (i%4 == 0&& i%100 != 0)) ans++;
    }

    for(int i=0;i<m1;i++) ans -= m[i];
    if((y1%400 == 0 || (y1%4 == 0 && y1%100 != 0)) && m1 <= 2) ans--;
    ans -= d1;

    for(int i=0;i<m2;i++) ans += m[i];
    if((y2%400 == 0 || (y2%4 == 0 && y2%100 != 0)) && m1 > 2) ans++;
    ans += d2;

    cout << ans << endl;

  }
}