#include<stdio.h>
int main(void){
   int y1, m1, d1, y2, m2, d2, Y1, Y2;
   while {
       scanf("%d %d %d %d %d %d", &y1, &m1, &d1, &y2, &m2, &d2);
       /*???????????´????±????????????????*/
       if ( m1 >= 3) Y1 = y1 + 1;
       else Y1 = y1;
       if ( m2 >= 3 ) Y2 = y2;
       else Y2 = y2 - 1;
       /*???????????´?????°????±???????*/
       for ( i = Y1; i < Y2; i++ ) {
           if ( i % 4 == 0 ) {
               if ( i % 400 == 0 ) u++;
               else if ( i % 100 == 0 ) u++;
               else u++;
           }
       }

    }
   return 0;
}