#include<iostream>
int main(){int a,b,c,d,e,f,g,h[]={0,0,31,59,90,120,151,181,212,243,273,304,334};for(;std::cin>>a>>b>>c>>d>>e>>f,a+1;std::cout<<g<<"\n"){g=f-c+h[e]-h[b]+(d-a)*365;e<3?d--:d;b<3?a--:a;g+=d/4-a/4-d/100+a/100+d/400-a/400;}}