int main()
{
	int startYear,startMonth,startDay,endYear,endMonth,endDay;
	int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int b[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
    int i,dertYear=0,dertMonth=0,dertDay=0,sum=0;
	scanf("%d%d%d%d%d%d",&startYear,&startMonth,&startDay,&endYear,&endMonth,&endDay);
	if(startDay<endDay)
	{
		for(i=startDay;i<endDay;i++)
			dertDay=dertDay+1;
	}
	else if(startDay>endDay)
	{
		for(i=startDay;i>endDay;i--)
			dertDay=dertDay-1;
	}
	if(startMonth<endMonth)
	{
		if(endYear%4==0&&endYear%100!=0||endYear%400==0)
		{
			for(i=startMonth;i<endMonth;i++)
				dertMonth=dertMonth+b[i];
		}
		else
		{
			for(i=startMonth;i<endMonth;i++)
				dertMonth=dertMonth+a[i];
		}
	}
	else if(startMonth>endMonth)
	{
		if(endYear%4==0&&endYear%100!=0||endYear%400==0)
		{
			for(i=startMonth;i>endMonth;i--)
				dertMonth=dertMonth-b[i];
		}
		else
		{
			for(i=startMonth;i>endMonth;i--)
				dertMonth=dertMonth-a[i];
		}
	}
	if(startYear<endYear)
	{
		for(i=startYear;i<endYear;i++)
		{
			if((i%4==0&&i%100!=0||i%400==0))
				dertYear=dertYear+366;
			else
				dertYear=dertYear+365;
		}
	}
	sum=dertDay+dertMonth+dertYear;
	printf("%d\n",sum);
	return 0;
}


int leapyearmonth[12] = {31,29,31,30,31,30,31,31,30,31,30,31};
int commonyearmonth[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
int dayofyear[2] = {365,366};
//????????
int IsLeapYear(int year)
{
	if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		return 1;
	else
		return 0;
}

int main()
{
int startYear,startMonth,startDay;
int endYear,endMonth,endDay;
scanf("%d%d%d",&startYear,&startMonth,&startDay);
scanf("%d%d%d",&endYear,&endMonth,&endDay);
int daybetweendates = 0;
int i,j,k;
	if(endYear == startYear)
	{
	int startdate = 0,enddate = 0;
	if(IsLeapYear(startYear)==1)
	{
		startdate += startDay;
		for(i = 0;i < startMonth - 1;i++)
			startdate += leapyearmonth[i];
		enddate += endDay;
		for(i = 0;i < endMonth - 1;i++)
			enddate += leapyearmonth[i];
	}
	if(IsLeapYear(startYear)==0)
	{
		startdate += startDay;
		for(i = 0;i < startMonth - 1;i++)
			startdate += commonyearmonth[i];
		enddate += endDay;
		for(i = 0;i < endMonth - 1;i++)
			enddate += commonyearmonth[i];
	}
	daybetweendates += enddate - startdate;
	}
	if(endYear - startYear > 0)
	{
	for(i = 1;i < endYear - startYear;i++)
	{
		daybetweendates += dayofyear[IsLeapYear(startYear + i)];
	}
	if(IsLeapYear(startYear)==1)
	{
	daybetweendates += leapyearmonth[startMonth - 1] - startDay;
	for(j = startMonth;j < 12;j++)
	{
		daybetweendates += leapyearmonth[j];
	}
	}
	if(IsLeapYear(startYear)==0)
	{
	daybetweendates += commonyearmonth[startMonth - 1] - startDay;
	for(k = startMonth;k < 12;k++)
	{
		daybetweendates += commonyearmonth[k];
	}
	}
	if(IsLeapYear(endYear)==1)
	{
	daybetweendates += endDay;
	for(j = 0;j < endMonth - 1;j++)
	{
		daybetweendates += leapyearmonth[j];
	}
	}
	if(IsLeapYear(endYear)==0)
	{
	daybetweendates += endDay;
	for(k = 0;k < endMonth - 1;k++)
	{
		daybetweendates += commonyearmonth[k];
	}
	}
	}
	printf("%d\n",daybetweendates);
	return 0;
}


int main() {
	int startYear, startMonth, startDay;
	int endYear, endMonth, endDay;
	int Day[13] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
	int day = 0;
	cin >> startYear >> startMonth >> startDay;
	cin >> endYear >> endMonth >> endDay;
	for (int i = startYear; i < endYear; i++) {
		if ((i % 4 == 0 && i % 100 != 0) || i % 400 == 0)
			day = day + 366;
		else
			day = day + 365;
	}
	if ((endYear % 4 == 0 && endYear % 100 != 0) || endYear % 400 == 0)
		Day[2] = 29;
	for (int i = 1; i < endMonth; i++) {
		day = day + Day[i];
	}
	day = day + endDay;
	if ((startYear % 4 == 0 && startYear % 100 != 0) || startYear % 400 == 0)
		Day[2] = 29;
	else
		Day[2] = 28;
	for (int i = 1; i < startMonth; i++) {
		day = day - Day[i];
	}
	day = day - startDay;
	cout << day;
	return 0;
}


int main()
{
 int startYear,startMonth,stratDay,endYear,endMonth,endDay,i,sum=0,num1=0,num2=0,total;
 int g[13]={0,31,28,31,30,31,30,31,31,30,31,30,31},s[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
  cin>>startYear>>startMonth>>stratDay;
  cin>>endYear>>endMonth>>endDay;
  for(i=startYear;i<endYear;i++)
  {
	  if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
		  sum=sum+366;
	  else
		  sum=sum+365;
  }
  for(i=0;i<startMonth;i++)
  {
	  if((startYear % 4 == 0 && startYear % 100 != 0) || (startYear % 400 == 0))
		  num1=num1+s[i];
	  else
		  num1=num1+g[i];

  }
  num1=num1+stratDay;
  for(i=0;i<endMonth;i++)
  {
       if((endYear % 4 == 0 && endYear % 100 != 0) || (endYear % 400 == 0))
		  num2=num2+s[i];
	   else
		   num2=num2+g[i];

  }
  num2=num2+endDay;
  total=sum-num1+num2;
  cout<<total<<endl;
  return 0;
}


int run_check(int year)
{
	if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		return 1;
	return 0;
}

int days_in_months[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

int main()
{
    int sy, sm, sd, ey, em, ed, ans = 0;

	cin >> sy >> sm >> sd >> ey >> em >> ed;

	for (int i = sy + 1; i < ey; i++)
		ans += run_check(i) + 365;

	if (sy != ey) {
		for (int i = sm + 1; i <= 12; i++) {
			ans += days_in_months[i];
			if (i == 2)
				ans += run_check(sy);
		}
		for (int i = 1; i < em; i++) {
			ans += days_in_months[i];
			if (i == 2)
				ans += run_check(ey);
		}
	}
	else {
		for (int i = sm + 1; i < em; i++) {
			ans += days_in_months[i];
			if (i == 2)
				ans += run_check(sy);
		}
	}

	if (sy != ey || sm != em) {
		for (int i = sd; i <= days_in_months[sm]; i++)
			ans++;
		if (sm == 2)
			ans += run_check(sy);
		for (int i = 1; i < ed; i++)
			ans++;
	}
	else {
		for (int i = sd; i < ed; i++)
			ans++;
	}
	cout << ans;
    return 0;
}


int main()
{int i,j=1,startyear,endyear,startmonth,endmonth,startday,endday;
int dou=0;
long days,p;
int	a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31},b[1000]={0};
cin>>startyear>>startmonth>>startday>>endyear>>endmonth>>endday;
for(i=1;i<=3000;i++)
	if((i%4==0&&i%100!=0)||i%400==0)
		{b[j]=i;/*????(year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)?
???2???29?*/
		j++;
		}
for(i=1;i<j;i++){
	if(startyear<b[i]&&b[i]<endyear)
		dou=dou+1;
	if(startyear==b[i]&&startmonth<=2)
		dou=dou+1;
	if(endyear==b[i]&&endmonth>=3)
			dou=dou+1;}
p=endyear-startyear;
days=p*365;
if(startmonth<endmonth)
	for(i=startmonth;i<endmonth;i++)
		days=days+a[i];
if(startmonth>endmonth)
	{for(i=startmonth;i<=12;i++)
		days=days+a[i];
	for(i=1;i<endmonth;i++)
			days=days+a[i];
	days=days-365;}
days=days+dou+endday-startday;
cout<<days<<endl;//???????????????

return 0;
}


int Inyear(int month,int day,int year,int i,int output)
{
	for(i=1;i<month;i++)
	{
		if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
			output+=31;
		else if(i==4||i==6||i==9||i==11)
			output+=30;
		else if(i==2&&((year%4==0&&year%100!=0)||(year%400==0)))
			output+=29;
		else
			output+=28;
	}
	output+=day;
	return output;
}

int main()
{
	int year[2],month[2],day[2],output=0,inyear,i;
	scanf("%d%d%d%d%d%d",&year[0],&month[0],&day[0],&year[1],&month[1],&day[1]);
	output=Inyear(month[1],day[1],year[1],i,inyear)-Inyear(month[0],day[0],year[0],i,inyear);
	for(i=year[0];i<year[1];i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
			output+=366;
		else
			output+=365;
	}
	printf("%d",output);
	return 0;
}


int god(int y,int m,int d);
int main(void)
{
	int year1,month1,day1,year2,month2,day2;
	scanf("%d%d%d%d%d%d",&year1,&month1,&day1,&year2,&month2,&day2);
		printf("%d",god(year2,month2,day2)-god(year1,month1,day1));

	getchar();
	return 0;
}
int god(int y,int m,int d)
{
	int sum =0,ctr;
	for(ctr=1;ctr<y;ctr++)
	{
		if((ctr % 4 == 0 && ctr % 100 != 0) || (ctr % 400 == 0))
			sum+=366;
		else
			sum+=365;
	}
	switch(m)
	{
	case 12:
		sum+=30;
	case 11:
		sum+=31;
	case 10:
		sum+=30;
	case 9:
		sum+=31;
	case 8:
		sum+=31;
	case 7:
		sum+=30;
	case 6:
		sum+=31;
	case 5:
		sum+=30;
	case 4:
		sum+=31;
	case 3:
		{
		if((y % 4 == 0 && y % 100 != 0) || (y % 400 == 0))
			sum+=29;
		else sum+=28;
		   }
	case 2:sum+=31;
	case 1:
	default:sum+=d;
		break;
	}

   	return sum;
}


/* Name        : ???????????
 * Version     : 1.0
 * Date        : 2013-01-12
 * New         :
 * Description :
 * State       : Design
 */
int R(int Y)
{
    return Y/4-Y/100+Y/400;
}
int RY(int Y)
{
    if ((Y%4==0 && Y%100!=0) || (Y%400==0)) return 1;
    else return 0;
}
int RM(int M,int Y)
{
    switch (M)
    {
        case  1:return 0;
        case  2:return 1;
        case  3:return -1+RY(Y);
        case  4:return 0+RY(Y);
        case  5:return 0+RY(Y);
        case  6:return 1+RY(Y);
        case  7:return 1+RY(Y);
        case  8:return 2+RY(Y);
        case  9:return 3+RY(Y);
        case 10:return 3+RY(Y);
        case 11:return 4+RY(Y);
        case 12:return 4+RY(Y);
    }
}
int main()
{
    int Ya,Yb,Ma,Mb,Da,Db;
    int Sa,Sb;
    cin>>Ya>>Ma>>Da;
    cin>>Yb>>Mb>>Db;
    Sa=365*(Ya-1)+30*(Ma-1)+Da+R(Ya-1)+RM(Ma,Ya);
    Sb=365*(Yb-1)+30*(Mb-1)+Db+R(Yb-1)+RM(Mb,Yb);
    cout<<Sb-Sa;
    return 0;
}


 int main()
 {
     int a,b,c,d,e,f,x=0,i,j;
     scanf("%d %d %d",&a,&b,&c);
     scanf("%d %d %d",&d,&e,&f);
     if(a==d){
              if(b==e){
                       x=f-c;}
              else{
                   for(i=b;i<=e;i++){
                                     if(i==4||i==6||i==9||i==11){
                                                                 if(i==b){
                                                                          x=30-c;
                                                                          continue;}
                                                                  else {if(i==e){
                                                                          x=x+f;
                                                                          continue;}
                                                                 else{
                                                                      x=x+30;
                                                                      continue;}
                                                                      }}
                                    else{ if(i==2){
                                               if(i==b){
                                                        x=28-c;
                                                        continue;
                                                        }
                                               else {if(i==e){
                                                        x=x+f;
                                                        continue;
                                                        }
                                               else{
                                                    x=x+28;
                                                    continue;
                                                    }}
                                             }
                                     else{

                                          if(i==b){
                                                   x=31-c;
                                                   continue;}
                                          if(i==e){
                                                   x=x+f;
                                                   continue;
                                                   }
                                          else{
                                               x=x+31;
                                               continue;}
                                          }}

                                     }
                  if(((a%4==0&&a%100!=0)||(a%400==0))&&(b<=2)&&(e>2))
                  x++;

                  }
                  }
      else{
           for(j=a;j<=d;j++){
                             if(j==a){
                                     for(i=b;i<=12;i++){

                                     if(i==4||i==6||i==9||i==11){
                                                                 if(i==b){
                                                                          x=30-c;
                                                                          continue;}
                                                                 else{
                                                                      x=x+30;
                                                                      continue;}
                                                                      }
                                     else {if(i==2){
                                               if(i==b){
                                                        x=28-c;
                                                        continue;}
                                               else{
                                                    x=x+28;
                                                    continue;}
                                             }
                                     else{
                                          if(i==b){
                                                   x=31-c;
                                                   continue;}
                                          else{
                                               x=x+31;
                                               continue;}
                                          }}
                                     }
                  if(((a%4==0&&a%100!=0)||(a%400==0))&&(b<=2))
                  x++;

                  }
                   else {

                         if(j==d){
                            for(i=1;i<=e;i++){
                                                                                if(i==4||i==6||i==9||i==11){
                                                                 if(i==e){
                                                                          x=x+f;
                                                                          continue;}
                                                                 else{

                                                                      x=x+30;

                                                                      continue;}
                                                                      }
                                    else{ if(i==2){
                                               if(i==e){
                                                        x=x+f;
                                                        continue;}
                                               else{
                                                    x=x+28;
                                                    continue;}
                                             }
                                     else{
                                          if(i==e){
                                                   x=x+f;
                                                   continue;}
                                          else{
                                               x=x+31;
                                               continue;}
                                          } }

                             }
                             if(((d%4==0&&d%100!=0)||(d%400==0))&&(e>2))
                             x++;

                             }
      else{

           if((j%4==0&&j%100!=0)||(j%400==0)){
                                              x=x+366;

                                              continue;}
                                              else{
                                              x=x+365;
                                              continue;}
                                              }}
             }

             }
     printf("%d",x);
     return 0;
     }


int main()
{
	int sum = 0;
	int year1 , year2;
	int month1 , month2;
	int day1 , day2;
	cin >> year1 >> month1 >> day1;
	cin >> year2 >> month2 >> day2;
	int mon[13] = { 0 , 31 , 28 , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31 };

	int year , month , day;
	int days;
	for( year = year1 ; year < year2 ; year ++ )
	{
		if( (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0 ))
			days = 366;
		else
			days = 365;
		sum = sum + days;
	}
	for( month = 1 ; month < month1 ; month ++ )
	{
		if( (year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0 ) )
			mon[2] = 29;
		sum = sum - mon[month];
	}
	for( day = 1 ; day < day1 ; day ++ )
		sum --;
	for( month = 1 ; month < month2 ; month ++ )
	{
		if( (year2 % 4 == 0 && year2 % 100 != 0) || (year2 % 400 == 0 ) )
			mon[2] = 29;
		sum = sum + mon[month];
	}
	for( day = 1 ; day < day2 ; day ++ )
		sum ++;
	cout << sum;

	return 0;
}


int day_of_year(int n)
{
  if(n%400==0) return 366;
  if((n%4==0)&&(n%100!=0)) return 366; else return 365;
}

int day_of_month(int month,int year)
{
 if(month==2)
  if(day_of_year(year)==366) return 29;else return 28;
 if((month==4)||(month==6)||(month==9)||(month==11)) return 30;
 else return 31;
}

int main()
{
 int year1,year2,month1,month2,day1,day2,i,j,sum,sumyear,summonth1,summonth2;
 scanf("%d %d %d\n%d %d %d",&year1,&month1,&day1,&year2,&month2,&day2);
 sum=sumyear=summonth1=summonth2=0;
 for(i=year1;i<year2;i++)
  sumyear+=day_of_year(i);
 for(i=1;i<month1;i++)
 summonth1=summonth1+day_of_month(i,year1);
 for(i=1;i<month2;i++)
 summonth2=summonth2+day_of_month(i,year2);
 sum=sumyear+summonth2+day2-summonth1-day1;
 printf("%d",sum);
 scanf("%d",&i);
 return 0;
}


int p(int a,int b,int c)
{
	int i,day=0;
	for(i=1;i<a;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
			day+=366;
		else day+=365;
	}
	for(i=1;i<b;i++)
	{
		switch(i)
		{
		case 1:day+=31;break;
		case 2:if((a%4==0&&a%100!=0)||(a%400==0))day+=29;
			else day+=28;break;
		case 3:day+=31;break;
		case 4:day+=30;break;
		case 5:day+=31;break;
		case 6:day+=30;break;
		case 7:day+=31;break;
		case 8:day+=31;break;
		case 9:day+=30;break;
		case 10:day+=31;break;
		case 11:day+=30;break;
		case 12:day+=31;break;
		}
	}
	day+=c;
	return(day);
}
void main()
{
	int a,b,c,d,e,f,x;
	scanf("%d %d %d",&a,&b,&c);
	scanf("%d %d %d",&d,&e,&f);
	x=p(d,e,f)-p(a,b,c);
	printf("%d",x);
}


int main()
{
	int startyear,startmonth,startday,endyear,endmonth,endday;
	int m[24]={31,28,31,30,31,30,31,31,30,31,30,31,31,28,31,30,31,30,31,31,30,31,30,31};
	int a,days,i,j;
	scanf("%d%d%d",&startyear,&startmonth,&startday);
	scanf("%d%d%d",&endyear,&endmonth,&endday);
	a=endyear-startyear;
	if(startmonth==endmonth)
		days=365*a;
	if(startmonth<endmonth)
	{
		days=365*a;
		for(i=startmonth;i<endmonth;i++)
		{
			days=days+m[i-1];
		}
	}
	if(startmonth>endmonth)
	{
		days=365*(a-1);
		for(i=startmonth;i<endmonth+12;i++)
		{
			days=days+m[i];
		}
	}
	days=days+endday-startday;
	for(j=startyear;j<=endyear;j++)
	{
		if((j%4==0&&j%100!=0)||(j%400==0))
			days=days+1;
	}
	if(((startyear%4==0&&startyear%100!=0)||(startyear%400==0))&&(startmonth>2))
		days=days-1;
	if(((endyear%4==0&&endyear%100!=0)||(endyear%400==0))&&(endmonth<2))
		days=days-1;
	printf("%d",days);
	return 0;
}


int main()
{
int syear,smonth,sday,eyear,emonth,eday;
scanf("%d %d %d\n%d %d %d",&syear,&smonth,&sday,&eyear,&emonth,&eday);
int y,s1,leapy,s2=0,s3=0,s;
s1=365*(eyear-syear);
for(y=syear,leapy=0;y<eyear;y++){
   if((y%4==0&&y%100!=0)||(y%400==0)){
	   leapy=leapy+1;
   }
}
s1=s1+leapy;
if (smonth==1) s2=0;
else if (smonth==2) s2=31;
else if (smonth==3) s2=59;
else if (smonth==4) s2=90;
else if (smonth==5) s2=120;
else if (smonth==6) s2=151;
else if (smonth==7) s2=181;
else if (smonth==8) s2=212;
else if (smonth==9) s2=243;
else if (smonth==10) s2=273;
else if (smonth==11) s2=304;
else  {
	s2=334;
}
	s2=s2+sday;
if (emonth==1) s3=0;
else if (emonth==2) s3=31;
else if (emonth==3) s3=59;
else if (emonth==4) s3=90;
else if (emonth==5) s3=120;
else if (emonth==6) s3=151;
else if (emonth==7) s3=181;
else if (emonth==8) s3=212;
else if (emonth==9) s3=243;
else if (emonth==10) s3=273;
else if (emonth==11) s3=304;
else  {
	s3=334;
}
s3=s3+eday;
	if(((syear%4==0&&syear%100!=0)||(syear%400==0))&&(smonth>2)){
		s2=s2+1;
	}
	if(((eyear%4==0&&eyear%100!=0)||(eyear%400==0))&&(emonth>2)){
		s3=s3+1;
	}
s=s1+s3-s2;
printf("%d\n",s);
return 0;
}


int isLeapYear(int year)
{
	return ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) ;
}

int deltayear (int year1 , int year2)
{
	int i ,result;
	result = 0 ;
	for (i = year1 ; i < year2 ; i++)
	{
       if (isLeapYear(i))
			result+=366;
		else
			result+=365;
	}
	return result ;
}

int deltamonth (int year1 , int year2 , int month1 , int month2)
{
	int m[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
	int i , result ;
	result = 0 ;
	if (isLeapYear(year1))
		m[1] = 29;
	for (i = 0 ; i < month1-1 ; i++)
		result-=m[i];
	if (isLeapYear(year1))
		m[1] = 28 ;
	if (isLeapYear(year2))
		m[1] = 29 ;
	for (i = 0 ; i < month2-1 ; i++)
		result+=m[i];
	if (isLeapYear(year2))
		m[1] = 28 ;
	return result ;
}

int deltaday (int day1 , int day2)
{
	int result ;
	result = 0 ;
	result-=day1;
	result+=day2;
	return result ;
}

int delta (int year1 , int month1 , int day1 , int year2 , int month2 , int day2)
{
	int result ;
	result = deltayear(year1,year2) + deltamonth(year1,year2,month1,month2) + deltaday(day1,day2) ;
	return result ;
}

int main ()
{
	int year1 , month1 , day1 ;
	int year2 , month2 , day2 ;
	int result ;
	scanf ("%d%d%d%d%d%d",&year1,&month1,&day1,&year2,&month2,&day2);
	result = delta (year1,month1,day1,year2,month2,day2);
	printf ("%d\n",result);
	return 0;
}


void main()
{
	int a,b,c,x,y,z,sum1=0,sum2=0,t=0,u=0,m=0,n=0,final;
		scanf("%d %d %d\n%d %d %d",&a,&b,&c,&x,&y,&z);

loop1: m=m+1;
	        	if(m==a)
			       t=t;
		       else
			   {
	             if(m%4==0)
					{
		              if(m%100!=0)
					  {t=t+1;goto loop1;}
		              else
						{
						  if(m%400==0)
						  {t=t+1;goto loop1;}
						  else goto loop1;
						}
					}
				 else goto loop1;
				}

loop2: n=n+1;
	             if(n==x)
		            u=u;
				else
				{
					if(n%4==0)
					{
						if(n%100!=0)
						{u=u+1;goto loop2;}
						else
							{
							 if(n%400==0)
							{u=u+1;goto loop2;}
							 else goto loop2;
							}
					}

	              else goto loop2;
				}
	 sum1=(a-1)*365+t;
	 sum2=(x-1)*365+u;
switch(b)
	 {
	 case 1:sum1=sum1+0 ;break;
     case 2:sum1=sum1+31 ;break;
	 case 3:sum1=sum1+59 ;break;
	 case 4:sum1=sum1+90 ;break;
	 case 5:sum1=sum1+120 ;break;
	 case 6:sum1=sum1+151; break;
	 case 7:sum1=sum1+181; break;
	 case 8:sum1=sum1+212; break;
	 case 9:sum1=sum1+243; break;
	 case 10:sum1=sum1+273; break;
	 case 11:sum1=sum1+304; break;
	 case 12:sum1=sum1+334; break;
	 }

switch(y)
	 {
	 case 1:sum2=sum2+0; break;
     case 2:sum2=sum2+31; break;
	 case 3:sum2=sum2+59; break;
	 case 4:sum2=sum2+90; break;
	 case 5:sum2=sum2+120; break;
	 case 6:sum2=sum2+151; break;
	 case 7:sum2=sum2+181; break;
	 case 8:sum2=sum2+212; break;
	 case 9:sum2=sum2+243; break;
	 case 10:sum2=sum2+273; break;
	 case 11:sum2=sum2+304; break;
	 case 12:sum2=sum2+334; break;
	 }
if(a%4==0)
	  {
		  if(a%100!=0)
		  {
			  if(b>2)
				  sum1=sum1+1;
			  else sum1=sum1;
		  }
		  else if(m%400==0)
		   {
			  if(b>2)
				  sum1=sum1+1;
			  else sum1=sum1;
		  };
	}
if(x%4==0)
	  {
		  if(x%100!=0)
		  {
			  if(y>2)
				  sum2=sum2+1;

		  };
		  if(x%400==0)
		   {
			  if(y>2)
				  sum2=sum2+1;
			  else sum2=sum2;
		  };
	}
		  sum1=sum1+c;
		  sum2=sum2+z;

final=sum2-sum1;
printf("\n%d",final);
}


int main()
{
	int daymonth[12]={31,28,31,30,31,30,31,31,30,31,30,31},dayyear=365,startyear,startmonth,startday,endyear,endmonth,endday;
	int yearx,monthx,dayx;
	int i,j,leap=0;
	int sum=0;
	cin>>startyear>>startmonth>>startday;
	cin>>endyear>>endmonth>>endday;
	yearx=endyear-startyear;
	monthx=endmonth-startmonth;
	dayx=endday-startday;
	if(yearx==0)
	{
		sum=0;
		leap=0;
		if((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))
			leap=1;
		if(monthx==0)
		{
			sum=dayx;
		}
		else
		{
			for(i=startmonth;i<endmonth-1;i++)
			{
				sum=sum+daymonth[i];
				if(leap&&i==1)
					sum=sum+1;
			}
			sum=sum+daymonth[startmonth-1]-startday+endday;
		}
		cout<<sum;
	}
	else
	{
		sum=0;

		for(i=1;i<yearx;i++)
		{
			leap=0;
			if(((startyear+i) % 4 == 0 && (startyear+i) % 100 != 0) || ((startyear+i) % 400 == 0))
				leap=1;
			sum=sum+dayyear+leap;
		}
		for(i=startmonth;i<12;i++)
		{
			leap=0;
			if((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))
				leap=1;
			sum=sum+daymonth[i];
			if(leap==1 && i==1)
				sum=sum+1;
		}
		for(i=0;i<endmonth-1;i++)
		{
			leap=0;
			if((endyear % 4 == 0 && endyear % 100 != 0) || (endyear % 400 == 0))
				leap=1;
			sum=sum+daymonth[i];
			if(leap==1 && i==1)
				sum=sum+1;
		}
		sum=sum+daymonth[startmonth-1]-startday+endday;
		cout<<sum;
	}
	return 0;
}


int isLeapYear(int year)
{
	return ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) ;
}

int deltayear (int year1 , int year2)
{
	int i ,result;
	result = 0 ;
	for (i = year1 ; i < year2 ; i++)
	{
       if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
			result+=366;
		else
			result+=365;
	}
	return result ;
}

int deltamonth (int year1 , int year2 , int month1 , int month2)
{
	int m[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
	int i , result ;
	result = 0 ;
	if (isLeapYear(year1))
		m[1] = 29;
	for (i = 0 ; i < month1-1 ; i++)
		result-=m[i];
	if (isLeapYear(year1))
		m[1] = 28 ;
	if (isLeapYear(year2))
		m[1] = 29 ;
	for (i = 0 ; i < month2-1 ; i++)
		result+=m[i];
	if (isLeapYear(year2))
		m[1] = 28 ;
	return result ;
}

int deltaday (int day1 , int day2)
{
	int result ;
	result = 0 ;
	result-=day1;
	result+=day2;
	return result ;
}

int delta (int year1 , int month1 , int day1 , int year2 , int month2 , int day2)
{
	int result ;
	result = deltayear(year1,year2) + deltamonth(year1,year2,month1,month2) + deltaday(day1,day2) ;
	return result ;
}

int main ()
{
	int year1 , month1 , day1 ;
	int year2 , month2 , day2 ;
	int result ;
	scanf ("%d%d%d%d%d%d",&year1,&month1,&day1,&year2,&month2,&day2);
	result = delta (year1,month1,day1,year2,month2,day2);
	printf ("%d",result);
	return 0;
}


int main()
{
	int startyear, endyear;
	int startmonth, endmonth;
	int startday, endday;
	int year, day, month;
    day=0;
	scanf("%d %d %d", &startyear, &startmonth, &startday);
	scanf("%d %d %d", &endyear, &endmonth, &endday);
	if(startyear!=endyear)
	{
	for(year=(startyear+1);year<endyear;year++)
	{
		if((year%4==0&&year%100!=0)||(year%400==0))
		{
			day=day+366;
		}
		else
			day=day+365;
	}
	if((startyear%4==0&&startyear%100!=0)||(startyear%400==0))
	{
		if(startmonth==1)
	        day=day+(31-startday)+29+(31*6)+(30*4);
	    if(startmonth==2)
		    day=day+(29-startday)+(31*6)+(30*4);
		if(startmonth==3)
			day=day+(31-startday)+30*4+31*5;
		if(startmonth==4)
			day=day+(30-startday)+30*3+31*5;
		if(startmonth==5)
			day=day+(31-startday)+30*3+31*4;
		if(startmonth==6)
			day=day+(30-startday)+30*2+31*4;
		if(startmonth==7)
			day=day+(31-startday)+30*2+31*3;
		if(startmonth==8)
			day=day+(31-startday)+30*2+31*2;
		if(startmonth==9)
			day=day+(30-startday)+30+31*2;
		if(startmonth==10)
			day=day+(31-startday)+31+30;
		if(startmonth==11)
			day=day+(30-startday)+31;
		if(startmonth==12)
			day=day+(31-startday);
	}
	else
	{
		if(startmonth==1)
	        day=day+(31-startday)+28+(31*6)+(30*4);
	    if(startmonth==2)
		    day=day+(28-startday)+(31*6)+(30*4);
		if(startmonth==3)
			day=day+(31-startday)+30*4+31*5;
		if(startmonth==4)
			day=day+(30-startday)+30*3+31*5;
		if(startmonth==5)
			day=day+(31-startday)+30*3+31*4;
		if(startmonth==6)
			day=day+(30-startday)+30*2+31*4;
		if(startmonth==7)
			day=day+(31-startday)+30*2+31*3;
		if(startmonth==8)
			day=day+(31-startday)+30*2+31*2;
		if(startmonth==9)
			day=day+(30-startday)+30+31*2;
		if(startmonth==10)
			day=day+(31-startday)+31+30;
		if(startmonth==11)
			day=day+(30-startday)+31;
		if(startmonth==12)
			day=day+(31-startday);
	}
	if((endyear%4==0&&endyear%100!=0)||(endyear%400==0))
	{
		if(endmonth==1)
			day=day+endday;
		if(endmonth==2)
			day=day+endday+31;
		if(endmonth==3)
			day=day+endday+31+29;
		if(endmonth==4)
			day=day+endday+31*2+29;
		if(endmonth==5)
			day=day+endday+31*2+30+29;
		if(endmonth==6)
			day=day+endday+31*3+30+29;
		if(endmonth==7)
			day=day+endday+31*3+30*2+29;
		if(endmonth==8)
			day=day+endday+31*4+30*2+29;
		if(endmonth==9)
			day=day+endday+31*5+30*2+29;
		if(endmonth==10)
			day=day+endday+31*5+30*3+29;
		if(endmonth==11)
			day=day+endday+31*6+30*3+29;
		if(endmonth==12)
			day=day+endday+31*6+30*4+29;
	}
	else
	{
		if(endmonth==1)
			day=day+endday;
		if(endmonth==2)
			day=day+endday+31;
		if(endmonth==3)
			day=day+endday+31+28;
		if(endmonth==4)
			day=day+endday+31*2+28;
		if(endmonth==5)
			day=day+endday+31*2+30+28;
		if(endmonth==6)
			day=day+endday+31*3+30+28;
		if(endmonth==7)
			day=day+endday+31*3+30*2+28;
		if(endmonth==8)
			day=day+endday+31*4+30*2+28;
		if(endmonth==9)
			day=day+endday+31*5+30*2+28;
		if(endmonth==10)
			day=day+endday+31*5+30*3+28;
		if(endmonth==11)
			day=day+endday+31*6+30*3+28;
		if(endmonth==12)
			day=day+endday+31*6+30*4+28;
	}
	}
	else
	{
		if(startyear==endyear)
		{
			if((endyear%4==0&&endyear%100!=0)||(endyear%400==0))
			{
				if(startmonth==endmonth)
					day=endday-startday;
				else
				{
					for(month=(startmonth+1);month<endmonth;month++)
					{
						if((month==3)||(month==5)||(month==7)||(month==8)||(month==10)||(month==12))
							day=day+31;
						else
						{
							if((month==4)||(month==6)||(month==9)||(month==11))
								day=day+30;
							else
							{
								if(month==2)
									day=day+29;
							}
						}
					}
					if((startmonth==3)||(startmonth==5)||(startmonth==7)||(startmonth==8)||(startmonth==10)||(startmonth==12))
						day=day+(31-startday)+endday;
					else
						{
							if((startmonth==4)||(startmonth==6)||(startmonth==9)||(startmonth==11))
								day=day+30-startday+endday;
							else
							{
								if(startmonth==2)
									day=day+29-startday+endday;
							}
						}
				}
			}
			else
			{
				if(startmonth==endmonth)
					day=endday-startday;
				else
				{
					for(month=(startmonth+1);month<endmonth;month++)
					{
						if((month==3)||(month==5)||(month==7)||(month==8)||(month==10)||(month==12))
							day=day+31;
						else
						{
							if((month==4)||(month==6)||(month==9)||(month==11))
								day=day+30;
							else
							{
								if(month==2)
									day=day+28;
							}
						}
					}
					if((startmonth==3)||(startmonth==5)||(startmonth==7)||(startmonth==8)||(startmonth==10)||(startmonth==12))
						day=day+(31-startday)+endday;
					else
						{
							if((startmonth==4)||(startmonth==6)||(startmonth==9)||(startmonth==11))
								day=day+30-startday+endday;
							else
							{
								if(startmonth==2)
									day=day+28-startday+endday;
							}
						}
				}
			}
		}
	}

	printf("%d", day);

	return 0;
}


// jisuan.cpp : Defines the entry point for the console application.
// ???????????????
int main()
{
	int startyear=0,startmonth,startday;
	int endyear=0,endmonth,endday;
	cin>>startyear>>startmonth>>startday;
	cin>>endyear>>endmonth>>endday;
	int leapyear=0,sum1=0,sum2=0,sum3=0;
	int year[2]={365,366};
	int month[2][12]={31,28,31,30,31,30,31,31,30,31,30,31,31,29,31,30,31,30,31,31,30,31,30,31};
	leapyear=((startyear%4==0)&&(startyear%100!=0))||(startyear%400==0);
	for(int i=0;i<startmonth-1;i++)
	{
		sum1=sum1+month[leapyear][i];
	}
	sum1=sum1+startday;
	for(int i=startyear;i<endyear;i++)
	{
		leapyear=((i%4==0)&&(i%100!=0))||(i%400==0);
		sum2=sum2+year[leapyear];
	}
    leapyear=((endyear%4==0)&&(endyear%100!=0))||(endyear%400==0);
	for(int k=0;k<endmonth-1;k++)
	{
		sum3=sum3+month[leapyear][k];
	}
	sum3=sum3+endday;
	sum2=sum2+sum3-sum1;
	cout<<sum2;
	return 0;
}


int main()
{
	int startyear,startmonth,startday,endyear,endmonth,endday,month[11],j,sumday,sum=0,startdays=0,enddays=0;
	month[0]=31;
	month[1]=28;
	month[2]=31;
	month[3]=30;
	month[4]=31;
	month[5]=30;
	month[6]=31;
	month[7]=31;
	month[8]=30;
	month[9]=31;
	month[10]=30;
	month[11]=31;
	scanf("%d%d%d%d%d%d",&startyear,&startmonth,&startday,&endyear,&endmonth,&endday);
	for(j=1;j<=startmonth-1;j++)
	startdays=startdays+month[j-1];
	startdays=startdays+startday;
	if(((startyear%4==0&&startyear%100!=0)||(startyear%400==0))&&(startmonth>2)) startdays=startdays+1;
	for(j=1;j<=endmonth-1;j++)
	enddays=enddays+month[j-1];
	enddays=enddays+endday;
	if(((endyear%4==0&&endyear%100!=0)||(endyear%400==0))&&(endmonth>2)) enddays=enddays+1;
	if(startyear==endyear) sumday=enddays-startdays;
	else
	{
		for(j=startyear;j<=endyear-1;j++)
		if((j%400!=0&&j%100==0)||(j%4!=0)) sum=sum+365;
		else sum=sum+366;
		sumday=sum+enddays-startdays;
	}
	printf("%d",sumday);
	return 0;
}


int yue( int m,int n)
{
	if(n==1 || n==3 || n==5 || n==7 || n==8 || n==10 || n==12)
		return 31;
	else if(n==4 || n==6 || n==9 || n==11)
		return 30;
	else if((m % 4 == 0 && m % 100 != 0) || (m % 400 == 0) && n==2)
		return 29;
	else
		return 28;
}
int nian(int m)
{
	if((m % 4 == 0 && m % 100 != 0) || (m % 400 == 0))
		return 366;
	else
		return 365;
}
int main()
{
	int a,b,c,d,e,f;
	cin>>a>>b>>c;
	cout<<endl;
	cin>>d>>e>>f;
	int sum=0,t=0;
	if(a==d)
	{
		for(int i=b;i<e;i++)
		{
			sum=sum+yue(a,i);
		}
		cout<<sum+f-c;
	}
	else
	{
		for(int i=a;i<d;i++)
		{
			sum=sum+nian(i);
		}
		if(b==e)
		{
			cout<<sum+f-c;
		}
		else if(e>b)
		{
			for(int s=b;s<e;s++)
			{
				sum=sum+yue(d,s);
			}
			cout<<sum+f-c;
		}
		else
		{
			for(int s=e;s<b;s++)
			{
				t=t+yue(d,s);
			}
			cout<<sum-(t+c-f);
		}
	}
	return 0;
}


int yearbegin(int y,int m,int d);
int pm[13]={0,31,28,31,30,31,30,31,31,30,31,30,31},
		rm[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int main()
{
	int sy,sm,sd,
		ey,em,ed;
	cin>>sy>>sm>>sd>>ey>>em>>ed;
	int sum=0;

	for(int i=sy+1;i<=ey-1;i++)
		if( (i%4==0 && i%100!=0) || (i%400==0) )
			sum=sum+366;
		else sum=sum+365;

	int syb=yearbegin(sy,sm,sd);
	int eyb=yearbegin(ey,em,ed);

	if(sy!=ey){
	if( (sy%4==0 && sy%100!=0) || (sy%400==0) )
	 syb=366-syb;
	else syb=365-syb;

	sum=sum+syb+eyb;}

	else sum=eyb-syb;

	cout<<sum;

	return 0;
}
int yearbegin(int y,int m,int d)
{
	int sumday=0;
	if( (y%4==0 && y%100!=0) || (y%400==0) )
		for(int i=1;i<m;i++)
			sumday=sumday+rm[i];
	else for(int i=1;i<m;i++)
		    sumday=sumday+pm[i];
    sumday=sumday+d;
	return sumday;
}


int main(){
	int day(int ,int );
	int sy,sm,sd;
	int ey,em,ed;
	int d=0,d1,d2;
	cin>>sy>>sm>>sd>>ey>>em>>ed;
	int i,run=0;
	for(i=sy;i<ey;i++)
		{
		if ((i%4==0 && i%100!=0) || (i%400==0))
        run=run+1;
		}
	d=365*(ey-sy-run)+366*run;
	d=d-day(sy,sm)+day(ey,em)-sd+ed;
	cout<<d;
	return 0;
}
int day(int year,int month){
	int a;
	if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
	switch(month){
	case 1:a=0;break;
	case 2:a=31;break;
	case 3:a=60;break;
	case 4:a=91;break;
	case 5:a=121;break;
	case 6:a=152;break;
	case 7:a=182;break;
	case 8:a=213;break;
	case 9:a=244;break;
	case 10:a=274;break;
	case 11:a=305;break;
	case 12:a=335;break;
	}
	else{
		switch(month){
			case 1:a=0;break;
			case 2:a=31;break;
			case 3:a=59;break;
			case 4:a=90;break;
			case 5:a=120;break;
			case 6:a=151;break;
			case 7:a=181;break;
			case 8:a=212;break;
			case 9:a=243;break;
			case 10:a=273;break;
			case 11:a=304;break;
			case 12:a=334;break;
		}
	}
	return a;
}


int rYear(int year)
{
	if( (year%4==0 && year%100!=0) || (year%400==0))
		return 366;
	else
		return 365;
}
int MonthDay(int year,int month)
{
	int day;
	switch(month)
	{
	case 2:
		if( rYear(year)-365 == 0)
			day=28;
		else if( rYear(year)-365 == 1)
			day=29;
		break;
	case 1: ;
	case 3: ;
	case 5: ;
	case 7: ;
	case 8: ;
	case 10: ;
	case 12: day=31;break;
	default : day=30;break;
	}
	return day;
}

int main(void)
{
	int year1,month1,day1;
	int year2,month2,day2;
	int num=0;
	cin>>year1>>month1>>day1;
	cin>>year2>>month2>>day2;
	for(int i=year1;i<year2;i++)
	{
		num += rYear(i);
	}
	for(int j=1;j<month2;j++)
	{
		num += MonthDay(year2,j);
	}
	for(int k=1;k<month1;k++)
	{
		num -= MonthDay(year1,k);
	}
	num += day2;
	num -= day1;
	cout<< num <<endl;
	return 0;
}


int runnian(int year)
{
	if((year%4==0&&year%100!=0)||(year%400==0))
		return 366;
	else
		return 365;
}

int dijitian(int year,int month,int date)
{
	int a[]={31,28,31,30,31,30,31,31,30,31,30,31};
	int i,sum=0;
	if(runnian(year)==366)
	{
		a[1]=29;
	}
	for(i=0;i<month-1;i++)
	{
		sum+=a[i];
	}
	sum+=date;

	return sum;
}

int main()
{
	int sy,sm,sd,ey,em,ed;
	scanf("%d %d %d",&sy,&sm,&sd);
	scanf("%d %d %d",&ey,&em,&ed);
	int sa,sb;
	sa=dijitian(sy,sm,sd);
	sb=dijitian(ey,em,ed);
	int i,days=0;
	for(i=sy;i<ey;i++)
	{
		days+=runnian(i);
	}
	days=days-sa+sb;
	printf("%d\n",days);
	return 0;
}


int main()
{
	int y,the_number=0,u,k,s,t,i,h,v,l,p,q,c,w,e,f;
	int z=0;
	int year1,month1,day1,year2,month2,day2;
	int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};                       //the number of days of every month
	scanf("%d %d %d %d %d %d",&year1,&month1,&day1,&year2,&month2,&day2);
	y=year2-year1;
    if(y==0)                                                                     //the dates are in the same year
	{
		if(month2-month1==0)
			the_number=day2-day1;
		else
		{
		    if(month1>2||month2<=2)
			{
			    for(i=1;i<=(month2-month1)-1;i++)
				   the_number=the_number+month[month1+i];
			    the_number=the_number+month[month1]-day1+day2;
			}
		    else
			{
			    for(q=1;q<=month2-month1-1;q++)
				   the_number=the_number+month[month1+q];
			    the_number=the_number+month[month1]-day1+day2+theleapyeardata(year1);
			}
		}
	}
	else                                                                         //the dates are in differentyears
	{
		if(month1>2&&month2<=2)
		{
			for(p=1;p<=y-2;p++)
				z=z+theleapyeardata(year1+p);
			for(l=1;l<=12-month1;l++)
				the_number=the_number+month[month1+l];
			for(w=1;w<=month2-1;w++)
				the_number=the_number+month[w];
			the_number=the_number+month[month1]-day1+day2+365*(year2-year1-1)+z;
		}
		else
		{
			if(month1<=2&&month2>2)
			{
				for(h=0;h<=y;h++)                 //the number of leapyears
				   z=z+theleapyeardata(year1+h);
			    for(v=1;v<=12-month1;v++)          //the first year without the first month
				   the_number=the_number+month[month1+v];
				for(c=1;c<=month2-1;c++)          //the last year without the last month
					the_number=the_number+month[c];
			    the_number=the_number+month[month1]-day1+day2+365*(year2-year1-1)+z;
			}
			else
			{
				if(month1<=2&&month2<=2)
				{
			        for(s=1;s<=y;s++)
				       z=z+theleapyeardata(year1+s-1);
			        for(t=1;t<=12-month1;t++)
			       	   the_number=the_number+month[month1+t];
					for(e=1;e<=month2-1;e++)
                       the_number=the_number+month[e];
			        the_number=the_number+month[month1]-day1+day2+365*(year2-year1-1)+z;
				}
				else
				{
			        for(u=1;u<=y;u++)
				       z=z+theleapyeardata(year1+u);
			        for(k=1;k<=12-month1;k++)
			           the_number=the_number+month[month1+k];
					for(f=1;f<=month2-1;f++)
						the_number=the_number+month[f];
			        the_number=the_number+month[month1]-day1+day2+365*(year2-year1-1)+z;
				}
			}
		}
	}
	printf("%d\n",the_number);
	return 0;
}

int theleapyeardata(int year)
{
    int z;
	if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		z=1;
	else z=0;
	return(z);
}


int main()
{
	int startyear, startmonth, startday, endyear, endmonth, endday, year, sum = 0, i;
	int m1[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, m2[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
	cin >> startyear >> startmonth >> startday >> endyear >> endmonth >> endday;
	year = startyear;
	while(year < endyear)
	{
		if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
			sum += 366;
		else
			sum += 365;
		year++;
	}
	if ((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))
	{
		for (i = 1; i < startmonth; i++)
			sum -= m2[i];
		sum -= startday;
	}
	else
	{
		for (i = 1; i < startmonth; i++)
			sum -= m1[i];
		sum -= startday;
	}
	if ((endyear % 4 == 0 && endyear % 100 != 0) || (endyear % 400 == 0))
	{
		for (i = 1; i < endmonth; i++)
			sum += m2[i];
		sum += endday;
	}
	else
	{
		for (i = 1; i < endmonth; i++)
			sum += m1[i];
		sum += endday;
	}
	cout << sum << endl;
	return 0;
}


int year(int y)
{
	int a;
	if((y%4==0&&y%100!=0)||(y%400==0)) a=366;
	else a=365;
	return(a);
}
int month(int m)
{
	int d;
	switch(m)
	{
	case 1:d=31;break;
    case 2:d=28;break;
    case 3:d=31;break;
    case 4:d=30;break;
    case 5:d=31;break;
    case 6:d=30;break;
    case 7:d=31;break;
    case 8:d=31;break;
    case 9:d=30;break;
    case 10:d=31;break;
    case 11:d=30;break;
    case 12:d=31;break;
	}
	return(d);
}
void main()
{
	int y1,y2,m1,m2,d1,d2,i,ds=0;
	scanf("%d%d%d",&y1,&m1,&d1);
	scanf("%d%d%d",&y2,&m2,&d2);
	for(i=y1;i<y2;i++) ds=ds+year(i);
	for(i=1;i<m1;i++) ds=ds-month(i);
	for(i=1;i<m2;i++) ds=ds+month(i);
	ds=ds+d2-d1;
	if(y1==y2&&year(y1)==366)
	{
		if(m2>2&&m1<3) ds=ds+1;
	}
	if(y1!=y2)
	{
		if(year(y1)==366&&m1>2) ds=ds-1;
	    if(year(y2)==366&&m2>2) ds=ds+1;
	}
	printf("%d\n",ds);
}


int main ()
{
	int syear, smonth, sday,eyear, emonth,eday;
	int leap[3001]={0},i;
	int days=0;
	int m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	cin >> syear >> smonth >> sday ;
	cin >> eyear >> emonth >> eday ;
	for (i=1; i<=3000; i++ )//??????
		leap[i]= (( (i % 4==0) && (i % 100!=0)) || i % 400==0);
	days = days+(eyear-syear)*365;
	for ( i=syear; i<= eyear; i++ )
		days = days+ leap[i];
	for ( i=1; i<= emonth-1; i++ )
		days = days + m[i];
	for ( i=1; i<= smonth - 1; i++ )
		days = days - m[i];
	if ( leap [ syear ] == 1 && smonth > 2 )
		days = days -1;
	if ( leap [eyear ] ==1 && emonth <= 2 )
		days = days -1;
	days = days + eday - sday ;
	cout << days << endl;
	return 0;
}


int RunNian(int year)
{
	if(((year%4==0)&&(year%100!=0))||(year%400==0))
		return 1;
	else
		return 0;
}
int Dijitian(int year,int month,int day)
{
	int total=0,i;
	for(i=1;i<month;i++)
	{
		if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
			total+=31;
		if(i==4||i==6||i==9||i==11)
			total+=30;
		if(i==2)
		{
			if(RunNian(year)) total+=29;
			else total+=28;
		}
	}
	total+=day;
	return total;
}
int main()
{
	int startYear,startMonth,startDay,endYear,endMonth,endDay;
	scanf("%d %d %d",&startYear,&startMonth,&startDay);
    scanf("%d %d %d",&endYear,&endMonth,&endDay);
	int num=0;
	if(startYear==endYear)
		num=Dijitian(endYear,endMonth,endDay)-Dijitian(startYear,startMonth,startDay);
	else
	{
		int i;
		for(i=startYear;i<endYear;i++)
		{
			if(RunNian(i))
				num+=366;
			else
				num+=365;
		}
		num+=Dijitian(endYear,endMonth,endDay)-Dijitian(startYear,startMonth,startDay);
	}
	printf("%d\n",num);
	return 0;
}


   int main(void){
   int year1,month1,day1,j,a,k;
   int year2,month2,day2,l,n,b,m;
   int sum1,sum2;
   int result;

   scanf("%d %d %d",&year1,&month1,&day1);

   scanf("%d %d %d",&year2,&month2,&day2);
   j=(year1-1)/4-(year1-1)/100+(year1-1)/400;
   if((year1%4==0&&year1%100!=0)||(year1%400==0))
   a=1;
   else
   a=0;
if(month1==1)
   k=0;
else if(month1==2)
   k=31;
else if(month1==3)
   k=59+a;
else if(month1==4)
   k=90+a;
else if(month1==5)
   k=120+a;
else if(month1==6)
   k=151+a;
else if(month1==7)
   k=181+a;
else if(month1==8)
   k=212+a;
else if(month1==9)
   k=243+a;
else if(month1==10)
   k=273+a;
else if(month1==11)
   k=304+a;
else
   k=334+a;
sum1=year1*365+k+day1+j;
   n=(year2-1)/4-(year2-1)/100+(year2-1)/400;
   {if((year2%4==0&&year2%100!=0)||(year2%400==0))
   b=1;
   else
   b=0;
if(month2==1)
   m=0;
else if(month2==2)
   m=31;
else if(month2==3)
   m=59+b;
else if(month2==4)
   m=90+b;
else if(month2==5)
   m=120+b;
else if(month2==6)
   m=151+b;
else if(month2==7)
   m=181+b;
else if(month2==8)
   m=212+b;
else if(month2==9)
   m=243+b;
else if(month2==10)
   m=273+b;
else if(month2==11)
   m=304+b;
else
   m=334+b;
sum2=year2*365+m+day2+n;}
    result=fabs(sum1-sum2);
    printf("%d",result);
}


int isRun(int year)
{
	if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		return 1;
	else
		return 0;
}
int main(int argc, char* argv[])
{
	int startYear, startMonth, startDay ;
	int endYear, endMonth, endDay;

	int startOffset=0, endOffset=0; ///??????????startyear 1-1
	int Month[12]={31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
	int i, j;

	scanf("%d%d%d",  &startYear, &startMonth, &startDay);
	scanf("%d%d%d",&endYear, &endMonth, &endDay);

	if (isRun(startYear))
	{
		if (startMonth>2)
		{
			for (i=0; i<startMonth-1; i++)
			{
				startOffset+=Month[i];
			}
			startOffset+=1;
			startOffset+=startDay-1;
		}
		else
		{
			for (i=0; i<startMonth-1; i++)
			{
				startOffset+=Month[i];
			}
			startOffset+=startDay-1;
		}
	}
	else
	{
		for (i=0; i<startMonth-1; i++)
		{
			startOffset+=Month[i];
		}
		startOffset+=startDay-1;
	}
	//////////////////////////////////////////////////////////////////////////

	for (j=startYear; j<endYear; j++)
	{
		if (isRun(j))
		{
			endOffset+=366;
		}
		else
			endOffset+=365;
	}

	if (isRun(endYear))
	{
		if (endMonth>2)
		{
			for (i=0; i<endMonth-1; i++)
			{
				endOffset+=Month[i];
			}
			endOffset+=1;
			endOffset+=endDay-1;
		}
		else
		{
			for (i=0; i<endMonth-1; i++)
			{
				endOffset+=Month[i];
			}
			endOffset+=endDay-1;
		}
	}
	else
	{
		for (i=0; i<endMonth-1; i++)
		{
			endOffset+=Month[i];
		}
		endOffset+=endDay-1;
	}

	if (endOffset>=startOffset)
	{
		printf("%d",(endOffset-startOffset));
	}

	return 0;
}


int dijitian(int year,int month,int day);
int main()
{
	int year1,month1,day1,total=0,year2,month2,day2,result,n;
	scanf("%d%d%d%d%d%d",&year1,&month1,&day1,&year2,&month2,&day2);
	int i;
	if(year1==year2){
		result=dijitian(year2,month2,day2)-dijitian(year1,month1,day1);
	}else{
		for(i=year1+1;i<year2;i++){
			if((i%400==0)||((i%4==0)&&(i%100!=0))){
				total+=366;
			}else{
				total+=365;
			}
		}
		if((year1%400==0)||((year1%4==0)&&(year1%100!=0))){
			result=366-dijitian(year1,month1,day1)+dijitian(year2,month2,day2)+total;
		}else{
			result=365-dijitian(year1,month1,day1)+dijitian(year2,month2,day2)+total;
		}
	}
	printf("%d\n",result);
	return 0;
}
int dijitian(int year,int month,int day){
	int i;
	int total=0;
	for(i=1;i<month;i++){
		if((i==1)||(i==3)||(i==5)||(i==7)||(i==8)||(i==10)||(i==12)){
			total+=31;
		}else if((i==4)||(i==6)||(i==9)||(i==11)){
			total+=30;\
		}else if(i==2){
			if((year%400==0)||((year%4==0)&&(year%100!=0))){
				total+=29;
			}else{
				total+=28;
			}
		}
	}
	total+=day;
	return (total);
}


int main(int argc, char* argv[])
{
	const int month1[14]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	const int month2[14]={0,31,29,31,30,31,30,31,31,30,31,30,31};

	int startYear,startMonth,startDay;
	int endYear,endMonth,endDay;
	int i,k,days;
	int flag;

	scanf("%d%d%d",&startYear,&startMonth,&startDay);
	scanf("%d%d%d",&endYear,&endMonth,&endDay);

	days=0;
//????????
	if(startYear==endYear){
		//??
		if ((startYear%4==0&&startYear%100!=0)||(startYear%400==0)){
			//????????
			if(startMonth==endMonth)
				days=endDay-startDay;
			//?????????
			else{
				for(k=startMonth;k<endMonth;k++)
					days+=month2[k];
				days+=endDay-startDay;
			}
		}
		//??
		else{
			if(startMonth==endMonth)
				days=endDay-startDay;
			else{
				for(k=startMonth;k<endMonth;k++)
					days+=month1[k];
				days+=endDay-startDay;
			}
		}
		printf("%d",days);
		return 0;
	}
//?????????
	for(i=startYear; i<=endYear; i++){
		if ((i%4==0&&i%100!=0)||(i%400==0))
			flag=1;
		else
			flag=0;
		//???
		if(i==startYear){
			if(flag==1)
				for(k=startMonth;k<=12;k++)
					days+=month2[k];
			else
				for(k=startMonth;k<=12;k++)
					days+=month1[k];
			days-=startDay;
		}
		//???
		else if(i==endYear){
			if(flag==1)
				for(k=1;k<endMonth;k++)
					days+=month2[k];
			else
				for(k=1;k<endMonth;k++)
					days+=month1[k];
			days+=endDay;
		}
		//?????+365 ? +366
		else{
			if(flag==1)
				for(k=1;k<=12;k++)
					days+=month2[k];
			else
				for(k=1;k<=12;k++)
					days+=month1[k];
		}
	}
	printf("%d",days);
	return 0;
}


int main ()
{
	int startyear,startmonth,startday,endyear,endmonth,endday,year,month,m,s=0;
	scanf("%d%d%d%d%d%d",&startyear,&startmonth,&startday,&endyear,&endmonth,&endday);
	if (startyear!=endyear)
	{
	for (year=startyear+1;year<endyear;year++)
	{
		if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
			s=s+366;
		else s=s+365;
	}
	for (month=1;month<endmonth;month++)
	{
		if(month==1||month==3||month==5||month==7||month==8||month==10||month==12)
			s=s+31;
		else if (month==4||month==6||month==9||month==11)
			s=s+30;
		else {
			        if ((endyear % 4 == 0 && endyear % 100 != 0) || (endyear % 400 == 0))
						s=s+29;
					else s=s+28;
		     }
	}
	s=s+endday-1;
	m=0;
	for (month=1;month<startmonth;month++)
	{
		if(month==1||month==3||month==5||month==7||month==8||month==10||month==12)
			m=m+31;
		else if (month==4||month==6||month==9||month==11)
			m=m+30;
		else {
			        if ((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))
						m=m+29;
					else m=m+28;
		     }
	}
         m=m+startday-1;
	if ((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))
		   s=s+366-m;
	   else
		   s=s+365-m;
	}
	else
		{
			if (startmonth!=endmonth)
			{
				for (month=startmonth+1;month<endmonth;month++)
				{
					if(month==1||month==3||month==5||month==7||month==8||month==10||month==12)
			s=s+31;
		else if (month==4||month==6||month==9||month==11)
			s=s+30;
		else {
			        if ((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))
						s=s+29;
					else s=s+28;
		     }
				}
				s=s+endday-1;
				if(startmonth==1||startmonth==3||startmonth==5||startmonth==7||startmonth==8||startmonth==10||startmonth==12)
			s=s+31-startday;
		else if (startmonth==4||startmonth==6||startmonth==9||startmonth==11)
			s=s+30-startday;
		else {
			        if ((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))
						s=s+29-startday;
					else s=s+28-startday;
		     }
			}
			else s=endday-startday;
	     }
	   	   printf("%d",s);
	   return 0;
}


int main()
{
	int leapyearjudgement(int YEAR);
	int daycounting(int month,int date,int LEAPYEAR);
	int sy,sm,sd,ey,em,ed;
	scanf("%d %d %d\n%d %d %d",&sy,&sm,&sd,&ey,&em,&ed);
	int year,countleapyear;
    countleapyear=0;
	for (year=sy;year<ey;year++)
		if ((year%4==0&&year%100!=0)||year%400==0) countleapyear++;
	int d1,d2;//d1???????????,??????????????2??????????
	d1=(ey-sy)*365+countleapyear;

	int daystart,dayend,leapyearstart,leapyearend;
	leapyearstart=leapyearjudgement(sy);
	daystart=daycounting(sm,sd,leapyearstart);
	leapyearend=leapyearjudgement(ey);
	dayend=daycounting(em,ed,leapyearend);

	d2=dayend-daystart;

	int DAY;
	DAY=d1+d2;
	printf("%d",DAY);
    return 0;
}

int leapyearjudgement(int YEAR)//?????
{
	int judge;//??????????1???0
	judge=0;
	if ((YEAR%4==0&&YEAR%100!=0)||YEAR%400==0) judge=1;
	return (judge);
}

int daycounting(int month,int date,int LEAPYEAR)//?????
{   int day;
	if (LEAPYEAR=1)
	{switch (month)
	{
	  case 1:day=date;break;
	  case 2:day=31+date;break;
	  case 3:day=60+date;break;
	  case 4:day=91+date;break;
	  case 5:day=121+date;break;
	  case 6:day=152+date;break;
	  case 7:day=182+date;break;
	  case 8:day=213+date;break;
	  case 9:day=244+date;break;
	  case 10:day=274+date;break;
	  case 11:day=305+date;break;
	  case 12:day=335+date;
	}
	}
	else
	{switch (month)
	{
	  case 1:day=date;break;
	  case 2:day=31+date;break;
	  case 3:day=60-1+date;break;
	  case 4:day=91-1+date;break;
	  case 5:day=121-1+date;break;
	  case 6:day=152-1+date;break;
	  case 7:day=182-1+date;break;
	  case 8:day=213-1+date;break;
	  case 9:day=244-1+date;break;
	  case 10:day=274-1+date;break;
	  case 11:day=305-1+date;break;
	  case 12:day=335-1+date;
	}
	}
	return (day);
}


int Month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int leapyear(int year)
{
    if(((year%4==0)&&(year%100!=0))||(year%400==0))
        return 366;
    else
        return 365;
}
int Days(int startyear,int month,int day)
{
    int days=0,j;
    for(j=0;j<month;j++)
       days+=Month[j];
    days+=day;
    if((leapyear(startyear)==366)&&(month>2))
        return days+1;
    else
        return days;
}
int main()
{

    int StartY,StartM,StartD,EndY,EndM,EndD,sum=0,i;
    cin>>StartY>>StartM>>StartD;
    cin>>EndY>>EndM>>EndD;
    if(StartY==EndY)
	    cout<<Days(EndY,EndM,EndD)-Days(StartY,StartM,StartD);
    else
    {
	    for(i=StartY;i<EndY;i++)
	        sum+=leapyear(i);
	    sum+=Days(EndY,EndM,EndD)-Days(StartY,StartM,StartD);
	    cout<<sum<<endl;
    }
    return 0;
}


int main()
{
	int styear,stmonth,stday,edyear,edmonth,edday,month,year,sum=0;
	cin>>styear>>stmonth>>stday>>edyear>>edmonth>>edday;
	if (edyear==styear)
	{
		if (edmonth==stmonth)
			sum=edday-stday;
		else
		{
			for (month=stmonth;month<=edmonth-1;month++)
			{
				switch (month)
				{
				case 2: sum+=28; break;
				case 1:
				case 3:
				case 5:
				case 7:
				case 8:
				case 10:
				case 12: sum+=31; break;
				default: sum+=30; break;
				}
			}
			if (((styear%4==0&&styear%100!=0)||(styear%400==0))&&stmonth<=2&&edmonth>2)
				sum++;
			sum=sum+edday-stday;
		}
	}
	else
	{
		for (year=styear;year<=edyear;year++)
		{
			if ((year%4==0&&year%100!=0)||(year%400==0))
				sum+=366;
			else
				sum+=365;
		}
		if (stmonth>1)
		{
			for (month=1;month<=stmonth-1;month++)
			{
				switch (month)
				{
				case 2: sum-=28; break;
				case 1:
				case 3:
				case 5:
				case 7:
				case 8:
				case 10:
				case 12: sum-=31; break;
				default: sum-=30; break;
				}
			}
			if (((styear%4==0&&styear%100!=0)||(styear%400==0))&&stmonth>2)
				sum-=1;
		}
		sum-=stday;
		for (month=edmonth;month<=12;month++)
		{
			switch (month)
			{
			case 2: sum-=28; break;
			case 1:
			case 3:
			case 5:
			case 7:
			case 8:
			case 10:
			case 12: sum-=31; break;
			default: sum-=30; break;
			}
		}
		if (((edyear%4==0&&edyear%100!=0)||(edyear%400==0))&&edmonth<=2)
			sum-=1;
		sum+=edday;
	}
	cout<<sum<<endl;
	return 0;
}


void main()
{
  int a,b,c,d,e=0,f,i,Syear,Smonth,Sday,Eyear,Emonth,Eday;
  scanf("%d%d%d%d%d%d",&Syear,&Smonth,&Sday,&Eyear,&Emonth,&Eday);
  a=Eyear-Syear;
  switch(Smonth)
  {
  case 1:b=0;break;
  case 2:b=31;break;
  case 3:b=59;break;
  case 4:b=90;break;
  case 5:b=120;break;
  case 6:b=151;break;
  case 7:b=181;break;
  case 8:b=212;break;
  case 9:b=243;break;
  case 10:b=273;break;
  case 11:b=304;break;
  case 12:b=334;break;
  }
  switch(Emonth)
  {
  case 1:c=0;break;
  case 2:c=31;break;
  case 3:c=59;break;
  case 4:c=90;break;
  case 5:c=120;break;
  case 6:c=151;break;
  case 7:c=181;break;
  case 8:c=212;break;
  case 9:c=243;break;
  case 10:c=273;break;
  case 11:c=304;break;
  case 12:c=334;break;
  }
  d=Eday-Sday;
  for(i=Syear+1;i<=Eyear-1;i++)
     if((i%4==0&&i%100!=0)||(i%400==0)) e+=1;
  if((Syear%4==0&&Syear%100!=0)||(Syear%400==0)&&(Smonth>=3)) e+=1;
  if((Eyear%4==0&&Eyear%100!=0)||(Eyear%400==0)&&(Emonth>=3)) e+=1;
  f=365*a+c-b+d+e;
  printf("%d",f);
  printf("\n");
}


int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};

int main()
{
	int countYear(int syear,int eyear);
	int countmonth(int year,int month,int day);
	int syear,smonth,sday,eyear,emonth,eday,day;
	scanf("%d%d%d%d%d%d",&syear,&smonth,&sday,&eyear,&emonth,&eday);
	int between,day1,day2;
	between=countYear(syear,eyear);
	day1=countmonth(syear,smonth,sday);
	day2=countmonth(eyear,emonth,eday);
	day=between-day1+day2;
	printf("%d",day);
	return 0;
}

countYear(int syear,int eyear)
{
	int day=0,i;
	for(i=syear;i<eyear;i++)
	{
		if((i%4==0&&i%100!=0)||i%400==0)
			day+=366;
		else
			day+=365;
	}
	return day;
}

countmonth(int year,int month,int day)
{
	int n=0,i;
	if((year%4==0&&year%100!=0)||year%400==0)
		a[2]=29;
	for(i=1;i<month;i++)
		n+=a[i];
	n=n+day;
	return n;
}


int main()
{
	int year1,month1,day1, year2,month2,day2;
	int sum = 0,flag =0,i;
	int year,month[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
	cin >> year1 >> month1 >> day1;
	cin >> year2 >> month2 >> day2;
	for (year = year1;year <= year2;year++)
	{
		flag = 0;
		if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
			flag = 1;
		if (year1 == year2)
		{
			for (i = month1;i < month2;i++)
			{
				sum += month[i];
			}
			sum = sum + day2 - day1;
			if (flag && month1 <= 2 && month2 > 2)
				sum ++;
		}
		else
		{
			if (year == year1)
			{
				for (i = month1;i <= 12;i++)
				{
					sum += month[i];
				}
				sum = sum  - day1;
				if (flag && (month1 <= 2))
					sum ++;
			}
			else if (year < year2)
			{
				sum += 365;
				if (flag)
					sum++;
			}
			if (year == year2)
			{
				for (i = 1;i < month2;i++)
				{
					sum += month[i];
				}
				sum = sum + day2;
				if (flag && (month1 <= 2 || month2 > 2))
					sum ++;
			}
			month1 = 1;
		}
	}
	cout << sum;
	return 0;
}


void main()
{
	int s=0,i;
	struct Date
	{
		int year;int month;int day;
	}date1,date2;
	scanf("%d%d%d",&date1.year,&date1.month,&date1.day);
	scanf("%d%d%d",&date2.year,&date2.month,&date2.day);
	s+=(date2.year-date1.year)*365;
	s+=(date2.month-date1.month)*30;
	s+=(date2.day-date1.day);
	for(i=date1.year;i<date2.year;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
		s++;
	}
	if(date2.month>=date1.month)
	{
		for(i=date1.month;i<date2.month;i++)
		{
			if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
				s++;
			if(i==2)
			{
				if((date2.year%4==0&&date2.year%100!=0)||(date2.year%400==0))
					s--;
				else
					s=s-2;
			}
		}
	}
	else
	{
	    for(i=date2.month;i<date1.month;i++)
		{
			if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
				s--;
			if(i==2)
			{
				if((date2.year%4==0&&date2.year%100!=0)||(date2.year%400==0))
					s++;
				else
					s=s+2;
			}
		}
	}
	printf("%d",s);
}


int main()
{
    int startYear,startMonth,startDay,endYear,endMonth,endDay,i,j,a,b,c=0,d,m,n,x,y,sum;
    scanf("%d%d%d%d%d%d",&startYear,&startMonth,&startDay,&endYear,&endMonth,&endDay);
    a=endYear-startYear;
    sum=365*a;
    for(b=startYear;b<endYear;b++)
  {  if((b % 4 == 0 && b % 100 != 0) || (b % 400 == 0))
    c++;}
    sum=sum+c;
    if((startYear % 4 == 0 && startYear % 100 != 0) || (startYear % 400 == 0))
   {m=29; if(startMonth==1){x=startDay;}if(startMonth==2){x=31+startDay;}
    if(startMonth==3){x=31+m+startDay;}if(startMonth==4){x=31+m+31+startDay;}if(startMonth==5){x=31+m+31+30+startDay;}
    if(startMonth==6){x=31+m+31+30+31+startDay;}if(startMonth==7){x=31+m+31+30+31+30+startDay;}
    if(startMonth==8){x=31+m+31+30+31+30+31+startDay;}if(startMonth==9){x=31+m+31+30+31+62+30+startDay;}
    if(startMonth==10){x=31+m+31+30+31+62+30+30+startDay;}if(startMonth==11){x=31+m+31+30+31+62+61+30+startDay;}
    if(startMonth==12){x=31+m+31+30+31+62+61+30+30+startDay;}}
    else
     {m=28; if(startMonth==1){x=startDay;}if(startMonth==2){x=31+startDay;}
    if(startMonth==3){x=31+m+startDay;}if(startMonth==4){x=31+m+31+startDay;}if(startMonth==5){x=31+m+31+30+startDay;}
    if(startMonth==6){x=31+m+31+30+31+startDay;}if(startMonth==7){x=31+m+31+30+31+30+startDay;}
    if(startMonth==8){x=31+m+31+30+31+30+31+startDay;}if(startMonth==9){x=31+m+31+30+31+62+30+startDay;}
    if(startMonth==10){x=31+m+31+30+31+62+30+30+startDay;}if(startMonth==11){x=31+m+31+30+31+62+61+30+startDay;}
    if(startMonth==12){x=31+m+31+30+31+62+61+30+30+startDay;}}
    sum=sum-x;
    if((endYear % 4 == 0 && endYear % 100 != 0) || (endYear % 400 == 0))
   {m=29; if(endMonth==1){y=endDay;}if(endMonth==2){y=31+endDay;}
    if(endMonth==3){y=31+m+endDay;}if(endMonth==4){y=31+m+31+endDay;}if(endMonth==5){y=31+m+31+30+endDay;}
    if(endMonth==6){y=31+m+31+30+31+startDay;}if(endMonth==7){y=31+m+31+30+31+30+endDay;}
    if(endMonth==8){y=31+m+31+30+31+30+31+startDay;}if(endMonth==9){y=31+m+31+30+31+62+30+endDay;}
    if(endMonth==10){y=31+m+31+30+31+62+30+30+startDay;}if(endMonth==11){y=31+m+31+30+31+62+61+30+endDay;}
    if(endMonth==12){y=31+m+31+30+31+62+61+30+30+endDay;}}
    else
       {m=28; if(endMonth==1){y=endDay;}if(endMonth==2){y=31+endDay;}
    if(endMonth==3){y=31+m+endDay;}if(endMonth==4){y=31+m+31+endDay;}if(endMonth==5){y=31+m+31+30+endDay;}
    if(endMonth==6){y=31+m+31+30+31+startDay;}if(endMonth==7){y=31+m+31+30+31+30+endDay;}
    if(endMonth==8){y=31+m+31+30+31+30+31+startDay;}if(endMonth==9){y=31+m+31+30+31+62+30+endDay;}
    if(endMonth==10){y=31+m+31+30+31+62+30+30+startDay;}if(endMonth==11){y=31+m+31+30+31+62+61+30+endDay;}
    if(endMonth==12){y=31+m+31+30+31+62+61+30+30+endDay;}}
    sum=sum+y;
    printf("%d",sum);
    return 0;}


int judge(int n)
{
	if((n%4==0&&n%100!=0)||(n%400==0))
	return 1;
	else return 0;
}
int main()
{
	int a[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	int year1, month1,day1,year2,day2,month2;
	cin>>year1>>month1>>day1>>year2>>month2>>day2;
	int i=1,time1=0,time2=0;
	a[1]=judge(year1)+28;
	for(i=1;i<month1;i++)
	{
		time1+=a[i-1];
	}
	time1+=day1-1;
	a[1]=judge(year2)+28;
	for(i=1;i<month2;i++)
	{
		time2+=a[i-1];
	}
	time2+=day2-1;
	int time=0;
	for(i=year1;i<year2;i++)
	{
		time+=365+judge(i);

	}
	int result;

	result=time+time2-time1;

	cout<<result;
		return 0;
}


/*
 * days.cpp
 *
 *  Created on: 2011-11-4
 *      Author: 99004
 */

int main(){
	int startyear,startmonth,startday,endyear,endmonth,endday;
	int i,dy,add,days1=0,days2=0;
	long days;
	cin>>startyear>>startmonth>>startday;
	cin>>endyear>>endmonth>>endday;
	dy=(endyear-startyear>1?(endyear-startyear-1):0);
	add=0;
	for(i=startyear+1;i<endyear;i++){
		if((i%4==0&&i%100!=0)||(i%400==0)) add++;
	}
	if((startyear%4==0&&startyear%100!=0)||startyear%400==0) add++;
	if((endyear%4==0&&endyear%100!=0)||endyear%400==0) add++;
	int month[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	if(startyear!=endyear){
	for(i=startmonth;i<13;i++) days1=days1+month[i];
	for(i=1;i<endmonth;i++) days2=days2+month[i];
	days=365*dy+add+days1+days2+(endday-startday);}
	else {
		for(i=startmonth;i<endmonth;i++) days1=days1+month[i];
		days=days1+endday-startday;
	}
	cout<<days<<endl;
	return 0;
}


//???????????
//2010?11?29?
//1000012753 ???
int countday(int year, int month, int day)
{
	int count;
	 switch (month)
	{
	case 1:
		count = day;
		break;
	case 2:
		count = (31 + day);
		break;
	case 3:
		count = (60 + day);
		break;
	case 4:
		count = (91 + day);
		break;
	case 5:
		count = (121 + day);
		break;
	case 6:
		count = (152 + day);
		break;
	case 7:
		count = (182 + day);
		break;
	case 8:
		count = (213 + day);
		break;
	case 9:
		count = (244 + day);
		break;
	case 10:
		count = (274 + day);
		break;
	case 11:
		count = (305 + day);
		break;
	case 12:
		count = (335 + day);
		break;
	}
	if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		return count;
	else
	{
		if (month <= 2)
			return count;
		else
			return (count - 1);
	}
}
int countyear(int year)
{
	int i, countyear = 0;
	for (i = 1; i <= year; ++i)
	{
		if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
			countyear++;
	}
	return (countyear * 366 + (year - countyear) * 365);
}
int main()
{
	int y1, y2, m1, m2, d1, d2, count1, count2;
	cin >> y1 >> m1 >> d1;
	cin >> y2 >> m2 >> d2;
	count1 = countday(y1, m1, d1);
	count2 = countday(y2, m2, d2);
	count1 += countyear(y1 - 1);
	count2 += countyear(y2 - 1);
	cout << count2 - count1 << endl;
	return 0;
}


int main()
{
	int startyear,startmonth,startday,endyear,endmonth,endday,n=0,year,j,t=0,d;
    int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
scanf("%d%d%d%d%d%d",&startyear,&startmonth,&startday,&endyear,&endmonth,&endday);
	for(year=startyear;year<=endyear;year++)
		if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
			n++;
	year=startyear;
	if((year % 4 == 0 && year % 100 != 0)|| (year % 400 == 0))
		if(startmonth>2)
		n--;
	year=endyear;
	if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		if((endmonth<2)||((endmonth==2)&&(endday<29)))
		n--;
	if(n<0)
		n=0;
	for(j=1;j<=12;j++)
	{if(j>startmonth)
	t=t+a[j];}
	t=t+a[startmonth]-startday;
	t=t+365*(endyear-startyear-1)+n;
	for(j=1;j<=12;j++)
	{if(j<endmonth)
	t=t+a[j];}
	t=t+endday;
	printf("%d",t);
	return 0;
}


int m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
struct date
{
	int year;
	int month;
	int day;
};
int count1(int a,int b)
{
	int i,s=0;
	for(i=1;i<a;i++)
		s=s+m[i];
	return s+b;
}
int count2(int a,int b)
{
	int i,s=0;
	for(i=1;i<a;i++)
		if(i==2)
			s=s+m[i]+1;
		else
			s=s+m[i];
	return s+b;
}
int main()
{
	int i,x=0,day[2]={0};
	struct date start,end;
	cin>>start.year>>start.month>>start.day;
	cin>>end.year>>end.month>>end.day;
	for(i=start.year;i<end.year;i++)
		if((i%4==0&&i%100!=0)||(i%400==0))
			x=x+366;
		else
			x=x+365;
	if((i%4==0&&i%100!=0)||(i%400==0))
		x=x+count2(end.month,end.day)-count2(start.month,start.day);
	else
		x=x+count1(end.month,end.day)-count1(start.month,start.day);
	cout<<x<<endl;
	return 0;
}


int leapYear(int year)
{
	if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		return 1;
	return 0;
}
int main()
{
	int i,startYear,endYear,startMonth,endMonth,startDay,endDay,count = 0;
	scanf("%d%d%d",&startYear,&startMonth,&startDay);
	scanf("%d%d%d",&endYear,&endMonth,&endDay);
	if(startYear < endYear)
	{
		for(i = startMonth + 1; i <= 12; i++)
		{
			switch (i)
			{
				case 1:
				case 3:
				case 5:
				case 7:
				case 8:
				case 10:
				case 12:count+=31;break;
				case 4:
				case 6:
				case 9:
				case 11:count+=30;break;
				case 2:
					if(leapYear(startYear))
						count+=29;
					else
						count+=28;
			}
		}
		for(i = 1; i < endMonth; i++)
		{
			switch (i)
			{
				case 1:
				case 3:
				case 5:
				case 7:
				case 8:
				case 10:
				case 12:count+=31;break;
				case 4:
				case 6:
				case 9:
				case 11:count+=30;break;
				case 2:
					if(leapYear(endYear))
						count+=29;
					else
						count+=28;
			}
		}
		switch (startMonth)
		{
			case 1:
			case 3:
			case 5:
			case 7:
			case 8:
			case 10:
			case 12:count+=31;break;
			case 4:
			case 6:
			case 9:
			case 11:count+=30;break;
			case 2:
				if(leapYear(endYear))
					count+=29;
				else
					count+=28;
		}
		count += endDay - startDay;
	}else{
		for(i = startMonth + 1; i < endMonth; i++)
		{
			switch (i)
			{
				case 1:
				case 3:
				case 5:
				case 7:
				case 8:
				case 10:
				case 12:count+=31;break;
				case 4:
				case 6:
				case 9:
				case 11:count+=30;break;
				case 2:
					if(leapYear(startYear))
						count+=29;
					else
						count+=28;
			}
		}
		if(startMonth < endMonth)
		{
			switch (startMonth)
			{
				case 1:
				case 3:
				case 5:
				case 7:
				case 8:
				case 10:
				case 12:count+=31;break;
				case 4:
				case 6:
				case 9:
				case 11:count+=30;break;
				case 2:
					if(leapYear(endYear))
						count+=29;
					else
						count+=28;
			}
		}
		count += endDay - startDay;
	}
	for(i = startYear + 1;i < endYear; i++)
	{
		count += 365 + leapYear(i);
	}
	printf("%d",count);
	return 0;
}


int year1,month1,day1,year2,month2,day2;
int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int main()
{
	int i,j,temp;
	int dis1,dis2,sum;
	scanf("%d%d%d",&year1,&month1,&day1);
	scanf("%d%d%d",&year2,&month2,&day2);
	int cmpa;
    int ru(int year);
	if (cmpa==0)
	{
		temp=year1; year1=year2; year2=temp;
		temp=month1; month1=month2; month2=temp;
		temp=day1; day1=day2; day2=temp;
	}
	dis1=0;
	for (i=1; i<month1; i++)
	{
		if ((i==2)&&(ru(year1)==1)) dis1++;
		dis1=dis1+month[i];
	}
	dis1=dis1+day1;
	dis2=0;
    for (i=1; i<month2; i++)
	{
		if ((i==2)&&(ru(year2)==1)) dis2++;
		dis2=dis2+month[i];
	}
	dis2=dis2+day2;
	sum=dis2-dis1;
	for (i=year1; i<year2; i++)
		if (ru(i)==1)
			sum=sum+366;
		else
			sum=sum+365;
	printf("%d",sum);
	return 0;
}

int cmpa()
{
	if (year1<year2) return(1);
	if (year1>year2) return(0);
	if (month1<month2) return (1);
	if (month1>month2) return(0);
	if (day1<day2) return (1);
	return(0);
}
int ru(int year)
{
	if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) return(1);
	else return(0);
}


int year[2],month[2],day[2],i,days=0,k=0;
int main(void)
{
    scanf("%d%d%d",&year[0],&month[0],&day[0]);
    scanf("%d%d%d",&year[1],&month[1],&day[1]);
    for (i=year[0]+1;i<year[1];i++)
    {
        if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
        days+=366;
        else days+=365;
    }
    if (year[0]!=year[1])
    {
          for (i=month[0]+1;i<=12;i++)
             switch (i)
             {
              case 1:case 3:case 5:case 7:case 8:case 10:case 12:days+=31;break;
              case 2:
                  if ((year[0] % 4 == 0 && year[0] % 100 != 0) || (year[0] % 400 == 0))
                     days+=29;
                     else days+=28;
                  break;
              default:days+=30;
             }
          for (i=1;i<=month[1]-1;i++)
             switch (i)
             {
              case 1:case 3:case 5:case 7:case 8:case 10:case 12:days+=31;break;
              case 2:
                  if ((year[1] % 4 == 0 && year[1] % 100 != 0) || (year[1] % 400 == 0))
                     days+=29;
                     else days+=28;
                  break;
              default:days+=30;
             }
          for (k=0;k<2;k++)
              switch (month[k])
             {
              case 1:case 3:case 5:case 7:case 8:case 10:case 12:days+=(int)fabs(31*(int)fabs(k-1)-day[k]);break;
              case 2:
                  if ((year[k] % 4 == 0 && year[k] % 100 != 0) || (year[k] % 400 == 0))
                     days+=(int)fabs(29*(int)fabs(k-1)-day[k]);
                     else days+=(int)fabs(28*(int)fabs(k-1)-day[k]);
                  break;
              default:days+=(int)fabs(30*(int)fabs(k-1)-day[k]);
             }
    }
    else if (month[0]!=month[1])
           {
                    for (i=month[0]+1;i<=month[1]-1;i++)
                      switch (i)
                      {
                      case 1:case 3:case 5:case 7:case 8:case 10:case 12:days+=31;break;
                      case 2:
                      if ((year[1] % 4 == 0 && year[1] % 100 != 0) || (year[1] % 400 == 0))
                      days+=29;
                      else days+=28;
                      break;
                      default:days+=30;
                      }
                    for (k=0;k<2;k++)
                     switch (month[k])
                      {
                       case 1:case 3:case 5:case 7:case 8:case 10:case 12:days+=(int)fabs(31*(int)fabs(k-1)-day[k]);break;
                       case 2:
                        if ((year[k] % 4 == 0 && year[k] % 100 != 0) || (year[k] % 400 == 0))
                        days+=(int)fabs(29*(int)fabs(k-1)-day[k]);
                         else days+=(int)fabs(28*(int)fabs(k-1)-day[k]);
                        break;
                       default:days+=(int)fabs(30*(int)fabs(k-1)-day[k]);
                      }
           }
           else days+=day[1]-day[0];
    printf("%d",days);
    return 0;
}


long int Jisuan(int year,int month,int day)
{
	long int Calnumber;
	Calnumber=year*365;
	int i,j=0;
	for(i=1;i<year;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
			j++;
	}
	Calnumber=Calnumber+j;
	int daysinFeb;
	if((year%4==0&&year%100!=0)||(year%400==0))
		daysinFeb=29;
	else
		daysinFeb=28;
	switch(month)
	{
	case 1:Calnumber+=0;
		break;
	case 2:Calnumber+=31;
		break;
	case 3:Calnumber+=31+daysinFeb;
		break;
	case 4:Calnumber+=31+31+daysinFeb;
		break;
	case 5:Calnumber+=31+31+30+daysinFeb;
		break;
	case 6:Calnumber+=31+31+30+31+daysinFeb;
		break;
	case 7:Calnumber+=31+31+31+30+30+daysinFeb;
		break;
	case 8:Calnumber+=31+31+31+31+30+30+daysinFeb;
		break;
	case 9:Calnumber+=31+31+31+31+31+30+30+daysinFeb;
		break;
	case 10:Calnumber+=31+31+31+31+31+30+30+30+daysinFeb;
		break;
	case 11:Calnumber+=31+31+3+31+31+31+30+30+30+daysinFeb;
		break;
	case 12:Calnumber+=365-28-31+daysinFeb;
		break;
	}
	Calnumber+=day;
	return(Calnumber);
}
int main()
{
	int y1,y2,m1,m2,d1,d2;
	scanf("%d %d %d\n%d %d %d",&y1,&m1,&d1,&y2,&m2,&d2);
	long int Cal1,Cal2;
	Cal1=Jisuan(y1,m1,d1);
	Cal2=Jisuan(y2,m2,d2);
	int Con;
	Con=Cal2-Cal1;
	printf("%d",Con);
	return 0;
}


int days[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int leap_days[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int isLeapYear(int year)
{
     return year % 400 == 0 || year % 4 == 0 && year % 100 != 0;
 }
 //????????(day,month)?????
 int sumFromFirstDay(int year, int month, int day)
{
    int i, ret = day;
    for (i = 1; i < month; i++)
        if (isLeapYear(year)) ret = ret + leap_days[i];
        else ret = ret + days[i];
    return ret;
}
 int main()
 {
     int startYear, startMonth, startDay;
    int endYear, endMonth, endDay;
    scanf("%d%d%d", &startYear, &startMonth, &startDay);
    scanf("%d%d%d", &endYear, &endMonth, &endDay);
     int i, sum = 0;
    for (i = startYear + 1; i < endYear; i++)
        sum += isLeapYear(i) ? 366 : 365;
    int start = sumFromFirstDay(startYear, startMonth, startDay);
    int end = sumFromFirstDay(endYear, endMonth, endDay);
  if (startYear == endYear) sum += end - start;
   else
   {
        sum += (365 - start) + end;
       if (isLeapYear(startYear)) sum++;
     }
    printf("%d",sum);
   return 0;
 }


int judge(int);
int main()
{
	int mon1[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
	int mon2[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
	int year1, year2, month1, month2, day1, day2, i, j, sum = 0;
	cin >> year1 >> month1 >> day1 >> year2 >> month2 >> day2;
	for(i = year1; i < year2; i++)
	{
		if(judge(i))
			sum += 366;
		else
			sum += 365;
	}
		if(judge(year2))
			for(j = 1; j < month2; j++)
				sum += mon2[j];
		else
			for(j = 1; j < month2; j++)
				sum += mon1[j];
		sum += day2;
		if(judge(year1))
		{
			for(j = 1; j < month1; j++)
				sum -= mon2[j];
			sum -= day1;
		}
		else
		{
			for(j = 1; j < month1; j++)
				sum -= mon1[j];
			sum -= day1;
		}
		cout << sum;
	return 0;
}
int judge(int year)
{
	if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		return 1;
	else
		return 0;
}


/********************************************************************
file base:	main
file ext:	cpp
author:		cromwell

purpose:	???????????
*********************************************************************/
int main()
{
	int startyear,startmonth,startday,endyear,endmonth,endday,i,j=0,sum;
	cin>>startyear>>startmonth>>startday>>endyear>>endmonth>>endday;
	int a[12]={31,59,90,120,151,181,212,243,273,304,334,365},b[12]={31,60,91,121,152,181,213,244,274,305,335,366};
	if(startyear!=endyear&&startyear+1!=endyear)
	{
		for(i=startyear+1;i<endyear;i++)
			if((i%4 == 0 && i % 100 != 0)||(i % 400 == 0))
				j++;
		if(startyear%4==0&&startyear%100!=0||startyear%400==0)
		{
			if(endyear%4==0&&endyear%100!=0||endyear%400==0)
			{
				if(startmonth!=1)
				{
					if(endmonth!=1)
						sum=(endyear-startyear-1)*365+j+b[11]-b[startmonth-2]-startday+b[endmonth-2]+endday;
					else
						sum=(endyear-startyear-1)*365+j+b[11]-b[startmonth-2]-startday+endday;
				}
				else
				{
					if(endmonth!=1)
						sum=(endyear-startyear-1)*365+j+b[11]-startday+b[endmonth-2]+endday;
					else
						sum=(endyear-startyear-1)*365+j+b[11]-startday+endday;
				}
			}
			else
			{
				if(startmonth!=1)
				{
					if(endmonth!=1)
						sum=(endyear-startyear-1)*365+j+b[11]-b[startmonth-2]-startday+a[endmonth-2]+endday;
					else
						sum=(endyear-startyear-1)*365+j+b[11]-b[startmonth-2]-startday+endday;
				}
				else
				{
					if(endmonth!=1)
						sum=(endyear-startyear-1)*365+j+b[11]-startday+a[endmonth-2]+endday;
					else
						sum=(endyear-startyear-1)*365+j+b[11]-startday+endday;
				}
			}
		}
		else
		{
			if(endyear%4==0&&endyear%100!=0||endyear%400==0)
			{
				if(startmonth!=1)
				{
					if(endmonth!=1)
						sum=(endyear-startyear-1)*365+j+a[11]-a[startmonth-2]-startday+b[endmonth-2]+endday;
					else
						sum=(endyear-startyear-1)*365+j+a[11]-a[startmonth-2]-startday+endday;
				}
				else
				{
					if(endmonth!=1)
						sum=(endyear-startyear-1)*365+j+a[11]-startday+b[endmonth-2]+endday;
					else
						sum=(endyear-startyear-1)*365+j+a[11]-startday+endday;
				}
			}
			else
			{
				if(startmonth!=1)
				{
					if(endmonth!=1)
						sum=(endyear-startyear-1)*365+j+a[11]-a[startmonth-2]-startday+a[endmonth-2]+endday;
					else
						sum=(endyear-startyear-1)*365+j+a[11]-a[startmonth-2]-startday+endday;
				}
				else
				{
					if(endmonth!=1)
						sum=(endyear-startyear-1)*365+j+a[11]-startday+a[endmonth-2]+endday;
					else
						sum=(endyear-startyear-1)*365+j+a[11]-startday+endday;
				}
			}
		}
	}
	if(startyear+1==endyear)
	{
		if(startyear%4==0&&startyear%100!=0||startyear%400==0)
		{
			if(endyear%4==0&&endyear%100!=0||endyear%400==0)
			{
				if(startmonth!=1)
				{
					if(endmonth!=1)
						sum=(endyear-startyear-1)*365+b[11]-b[startmonth-2]-startday+b[endmonth-2]+endday;
					else
						sum=(endyear-startyear-1)*365+b[11]-b[startmonth-2]-startday+endday;
				}
				else
				{
					if(endmonth!=1)
						sum=(endyear-startyear-1)*365+b[11]-startday+b[endmonth-2]+endday;
					else
						sum=(endyear-startyear-1)*365+b[11]-startday+endday;
				}
			}
			else
			{
				if(startmonth!=1)
				{
					if(endmonth!=1)
						sum=(endyear-startyear-1)*365+b[11]-b[startmonth-2]-startday+a[endmonth-2]+endday;
					else
						sum=(endyear-startyear-1)*365+b[11]-b[startmonth-2]-startday+endday;
				}
				else
				{
					if(endmonth!=1)
						sum=(endyear-startyear-1)*365+b[11]-startday+a[endmonth-2]+endday;
					else
						sum=(endyear-startyear-1)*365+b[11]-startday+endday;
				}
			}
		}
		else
		{
			if(endyear%4==0&&endyear%100!=0||endyear%400==0)
			{
				if(startmonth!=1)
				{
					if(endmonth!=1)
						sum=(endyear-startyear-1)*365+a[11]-a[startmonth-2]-startday+b[endmonth-2]+endday;
					else
						sum=(endyear-startyear-1)*365+a[11]-a[startmonth-2]-startday+endday;
				}
				else
				{
					if(endmonth!=1)
						sum=(endyear-startyear-1)*365+a[11]-startday+b[endmonth-2]+endday;
					else
						sum=(endyear-startyear-1)*365+a[11]-startday+endday;
				}
			}
			else
			{
				if(startmonth!=1)
				{
					if(endmonth!=1)
						sum=(endyear-startyear-1)*365+a[11]-a[startmonth-2]-startday+a[endmonth-2]+endday;
					else
						sum=(endyear-startyear-1)*365+a[11]-a[startmonth-2]-startday+endday;
				}
				else
				{
					if(endmonth!=1)
						sum=(endyear-startyear-1)*365+a[11]-startday+a[endmonth-2]+endday;
					else
						sum=(endyear-startyear-1)*365+a[11]-startday+endday;
				}
			}
		}
	}
	if(startyear==endyear)
	{
		if(startyear%4==0&&startyear%100!=0||startyear%400==0)
		{
			if(startmonth!=1)
				sum=b[endmonth-2]+endday-b[startmonth-2]-startday;
			if(startmonth==1)
			{
				if(endmonth==1)
					sum=endday-startday;
				else
					sum=b[endmonth-2]+endday-startday;
			}
		}
		else
		{
			if(startmonth!=1)
				sum=a[endmonth-2]+endday-a[startmonth-2]-startday;
			if(startmonth==1)
			{
				if(endmonth==1)
					sum=endday-startday;
				else
					sum=a[endmonth-2]+endday-startday;
			}
		}
	}
	cout<<sum<<endl;
	return 0;
}


int main()
{
	int year1,year2,month1,month2,day1,day2,a,b,year,days,i;
	scanf("%d%d%d\n",&year1,&month1,&day1);
	scanf("%d%d%d",&year2,&month2,&day2);
	if((year1%4==0&&year1%100!=0)||(year1%400==0))
	{
		switch(month1)
		{
		case 1:
			a=day1;
			break;
		case 2:
			a=31+day1;
			break;
		case 3:
			a=60+day1;
			break;
		case 4:
			a=91+day1;
			break;
		case 5:
			a=121+day1;
			break;
		case 6:
			a=152+day1;
			break;
		case 7:
			a=182+day1;
			break;
		case 8:
			a=213+day1;
			break;
		case 9 :
			a=244+day1;
			break;
		case 10:
			a=274+day1;
			break;
		case 11:
			a=305+day1;
			break;
		case 12:
			a=335+day1;
			break;
		}
	}
	else
	{
		switch (month1)
		{
		case 1:
			a=day1;
			break;
		case 2:
			a=31+day1;
			break;
		case 3:
			a=59+day1;
			break;
		case 4:
			a=90+day1;
			break;
		case 5:
			a=120+day1;
			break;
		case 6:
			a=151+day1;
			break;
		case 7:
			a=181+day1;
			break;
		case 8:
			a=212+day1;
			break;
		case 9:
			a=243+day1;
			break;
		case 10 :
			a=273+day1;
			break;
		case 11:
			a=304+day1;
			break;
		case 12:
			a=334+day1;
			break;
		}
	}
	if((year2%4==0&&year2%100!=0)||(year2%400==0))
	{
		switch (month2)
		{
		case 1:
			b=day2;
			break;
		case 2:
			b=31+day2;
			break;
		case 3:
		    b=60+day2;
			break;
		case 4:
			b=91+day2;
			break;
		case 5:
			b=121+day2;
			break;
		case 6:
			b=152+day2;
			break;
		case 7:
			b=182+day2;
			break;
		case 8:
			b=213+day2;
			break;
		case 9:
			b=244+day2;
			break;
		case 10 :
			b=274+day2;
			break;
		case 11:
			b=305+day2;
			break;
		case 12:
			b=335+day2;
			break;
		}
	}
	else
	{
		switch (month2)
		{
		case 1:
			b=day2;
			break;
		case 2:
			b=31+day2;
			break;
		case 3:
			b=59+day2;
			break;
		case 4:
			b=90+day2;
			break;
		case 5:
			b=120+day2;
			break;
		case 6:
			b=151+day2;
			break;
		case 7:
			b=181+day2;
			break;
		case 8:
			b=212+day2;
			break;
		case 9:
			b=243+day2;
			break;
		case 10:
			b=273+day2;
			break;
		case 11:
			b=304+day2;
			break;
		case 12:
			b=334+day2;
			break;
		}
	}
	year=0;
	for(i=year1;i<year2;i++)
	{
		if ((i%4==0&&i%100!=0)||(i%400==0))
			year=year+366;
		else
			year=year+365;
	}
	days=b-a+year;
	printf("%d",days);
	return 0;
}


int main()
{
	int days[2][13]={{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}};

	int syear,smonth,sday,eyear,emonth,eday;

	cin>>syear>>smonth>>sday>>eyear>>emonth>>eday;

	int r;
	int i,year,end;
	int num=0;

	if((syear % 4 == 0 && syear % 100 != 0) || (syear % 400 == 0))
		r=1;
	else
		r=0;

	if(eyear!=syear)
	{
			num+=days[r][smonth]-sday;
	}
	else
	{
		if(emonth!=smonth)
			num+=days[r][smonth]-sday;
	}
	if(eyear==syear)
		end=emonth-1;
	else
		end=12;

	for(i=smonth+1;i<=end;i++)
		num+=days[r][i];

	for(year=syear+1;year<eyear;year++)
	{
		if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
			r=1;
		else
			r=0;
		num+=365+r;
	}

	if((eyear % 4 == 0 && eyear % 100 != 0) || (eyear % 400 == 0))
			r=1;
		else
			r=0;

	i=1;
	if(eyear==syear)
		i=smonth+1;
	for(;i<emonth;i++)
		num+=days[r][i];

	if(eyear!=syear)
	{
		num+=eday;
	}
	else
	{
		if(emonth == smonth)
		num+=(eday-sday);
		else
			num+=eday;
	}
	cout<<num<<endl;
	return 0;
}


void main()
{
	int a1,a2,b1,b2,c1,c2;
	int num,i;

	scanf("%d %d %d",&a1,&b1,&c1);
	scanf("%d %d %d",&a2,&b2,&c2);

	int pdrun(int);
	int tohead(int,int,int);
	int toend(int,int,int);

	if(a1==a2)num=tohead(a2,b2,c2)-tohead(a1,b1,c1);
	if(a1!=a2){num=tohead(a2,b2,c2)+toend(a1,b1,c1);
	          for(i=a1+1;i<a2;i=i+1)
			  {
				  if(pdrun(i)==1)num=num+366;
				  else num=num+365;
			  }

	}

	printf("%d",num);
}

int pdrun(int i)
{
	int n;
	if(i%4==0&&i%100!=0||i%400==0)n=1;
	 else n=0;
	 return(n);
}

tohead(int x,int y,int z)
{
	int sum;
    int	pdrun(int);
	sum=0;
	switch(y)
	{	case 12:sum=sum+30;
	case 11:sum=sum+31;
	case 10:sum=sum+30;
	case 9:sum=sum+31;
	case 8:sum=sum+31;
	case 7:sum=sum+30;
	case 6:sum=sum+31;
	case 5:sum=sum+30;
	case 4:sum=sum+31;
	case 3:if(pdrun(x)==1)sum=sum+29;else sum=sum+28;
	case 2:sum=sum+31;
	case 1:sum=sum+z;

	}
	return(sum);

}
int toend(int x,int y,int z)
{
	int sum;

	if(pdrun(x)==1)sum=366-tohead(x,y,z);
	else sum=365-tohead(x,y,z);

	return(sum);

}


int years(int year)
{
	if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		return  366;
	else return 365;
}
int months (int month,int year)
{
	if( month==1||month==3||month==5||month==7||month==8||month==10||month==12)
		return 31;
	if(month==4||month==6||month==9||month==11)
		return 30;
	if(years(year)==366)
		return 29;
	return 28;
}
int main()
{
	int day1[3]={0},day2[3]={0},sum=0;
	for ( int i=0;i<3;i++)
		cin>>day1[i];
	for ( int i=0;i<3;i++)
		cin>>day2[i];
	for ( int i=day1[0]+1;i<day2[0];i++)
		sum=sum+years(i);
	if(day1[0]!=day2[0])
	{
	for ( int i=day1[1];i<=12;i++)
		sum=sum+months(i,day1[0]);
	for ( int i=1;i<day2[1];i++)
		sum=sum+months(i,day2[0]);

	}
	else
			for ( int i=day1[1];i<day2[1];i++)
				sum=sum+months(i,day2[0]);
	sum=sum+day2[2]-day1[2];
	cout<<sum<<endl;

	return 0;

}


  int runnian(int);
  int yuefen(int,int,int);

int main()
{
  int year1,month1,day1,year2,month2,day2;
  cin>>year1>>month1>>day1>>year2>>month2>>day2;
  int i,answer=0;
  for (i=year1;i<year2;i++)
	  answer+=runnian(i)+365;
  answer=answer-yuefen(year1,month1,day1)+yuefen(year2,month2,day2);
  cout<<answer;
  return 0;
}

int runnian(int year)
{
	if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		return 1;
	else
		return 0;
}

int yuefen(int year,int month,int day)
{
	int ans=0;
	switch(month)
	{
	case 12:ans+=30;
	case 11:ans+=31;
	case 10:ans+=30;
	case 9:ans+=31;
	case 8:ans+=31;
	case 7:ans+=30;
	case 6:ans+=31;
	case 5:ans+=30;
	case 4:ans+=31;
	case 3:ans+=28+runnian(year);
	case 2:ans+=31;
	case 1:ans+=0;
	}
    ans+=day;
	return ans;
}


  int main()
 {
  int a,b,c,x,y,z,i,n=0,e,f,h;
  scanf("%d %d %d\n%d %d %d",&a,&b,&c,&x,&y,&z);
  for (i=a;i<x;i++)
  {if ((i%4==0&&i%100!=0)||(i%400==0)) n++;}
  {if ((a%4==0&&a%100!=0)||(a%400==0))
   switch (b)
{case 1:e=0;break;case 2:e=31;break;case 3:e=60;break;case 4:e=91;break;case 5:e=121;break;case 6:e=152;break; case 7:e=182;break; case 8:e=213; break;case 9:e=244;break;case 10:e=274;break; case 11:e=305; break;case 12:e=335;break;}
 else
 switch(b)
{case 1:e=0;break;case 2:e=31;break;case 3:e=59;break;case 4:e=90;break;case 5:e=120;break;case 6:e=151;break; case 7:e=181;break; case 8:e=212; break;case 9:e=243;break;case 10:e=273;break; case 11:e=304; break;case 12:e=334;break;}}
 {if ((x%4==0&&x%100!=0)||(x%400==0))
 switch (y)
{case 1:f=0;break;case 2:f=31;break;case 3:f=60;break;case 4:f=91;break;case 5:f=121;break;case 6:f=152; break;case 7:f=182; break;case 8:f=213; break;case 9:f=244;break;case 10:f=274; break;case 11:f=305; break;case 12:f=335;break;}
 else switch(y)
{case 1:f=0;break;case 2:f=31;break;case 3:f=59;break;case 4:f=90;break;case 5:f=120;break;case 6:f=151; break;case 7:f=181;break; case 8:f=212;break; case 9:f=243;break;case 10:f=273; break;case 11:f=304; break;case 12:f=334;break;}}
h=365*(x-a)+n+f+z-e-c;
 printf ("%d",h);
}


/*
 * distanceofdates.cpp
 *
 *  Created on: 2011-11-4
 *      Author: LTY
 */
int main(){
	int startyear,startmonth,startday,endyear,endmonth,endday;
	int days1,days2,days3,i,j=0,t=0;
	cin>>startyear>>startmonth>>startday;
	cin>>endyear>>endmonth>>endday;
	if((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))
		{
		int month[]={0,31,29,31,30,31,30,31,31,30,31,30,31};
		days1=startday;
		for(i=1;i<startmonth;i++)
			days1=days1+month[i];
		}
	else
		{
		int month[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
		days1=startday;
		for(i=1;i<startmonth;i++)
			days1=days1+month[i];
		}
	if((endyear % 4 == 0 && endyear % 100 != 0) || (endyear % 400 == 0))
			{
			int month[]={0,31,29,31,30,31,30,31,31,30,31,30,31};
			days2=endday;
			for(i=1;i<endmonth;i++)
				days2=days2+month[i];
			}
		else
			{
			int month[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
			days2=endday;
			for(i=1;i<endmonth;i++)
				days2=days2+month[i];
			}
	for(i=startyear;i<endyear;i++)
	{
		if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
			j=j+1;
		else
			t=t+1;
	}
	days3=(days2-days1)+j*366+t*365;
	cout<<days3<<endl;
	return 0;
}


void main()
{
	int a,b,c,d,e,f,g,n,m,i;
	int rui(int x);
	int day(int p,int q);
	scanf("%d%d%d",&a,&b,&c);
	scanf("%d%d%d",&e,&f,&g);
	n=day(a,b)+c;
	m=day(e,f)+g;
	for (i=a;i<=e-1;i++)
	{if (rui(i)==0) m=m+365;
		else m=m+366;}
	printf("%d",m-n);
}
int rui(int x)
{
   int z;
   if ((x%4==0&&x%100!=0)||(x%400==0))
	   z=1;
   else z=0;
   return(z);
}
int day(int p,int q)
{
	int l=0;
	switch(q)
	{ case 12:l=l+30;
	  case 11:l=l+31;
	  case 10:l=l+30;
	  case 9:l=l+31;
	  case 8:l=l+31;
	  case 7:l=l+30;
	  case 6:l=l+31;
	  case 5:l=l+30;
   	  case 4:l=l+31;
	  case 3:{ if (rui(p)==0) l=l+28;
		  else l=l+29;}
	  case 2:l=l+31;
	  case 1:l=l+0;
			 }
		  return(l);
}


int main()
{
	int monthday_ping[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int monthday_run[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
	struct cal
	{
		int year;
		int month;
		int day;
	}date[2];

	int yy,mm,dd,sum=0,i;
	cin>>date[0].year>>date[0].month>>date[0].day;
	cin>>date[1].year>>date[1].month>>date[1].day;
	if(date[1].year-date[0].year>0)
	{
	if(date[1].year-date[0].year>1)
	{
		sum=365*(date[1].year-date[0].year-1);
	}
	for(i=date[0].month;i<=12;i++)
	{
		sum=sum+monthday_ping[i];
	}
	sum=sum-date[0].day;
	for(i=1;i<date[1].month;i++)
	{
		sum=sum+monthday_ping[i];
	}
	sum=sum+date[1].day;
	}
	else
	{
		if(date[0].month<date[1].month)
		{
		for(i=date[0].month;i<date[1].month;i++)
		{
			sum=sum+monthday_ping[i];
		}
		sum=sum-date[0].day+date[1].day;
		}
		else sum=date[1].day-date[0].day;
	}

	for(i=date[0].year+1;i<date[1].year;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
		{
			sum++;
		}
	}
	if((date[0].year%4==0&&date[0].year%100!=0)||(date[0].year%400==0))
	{
		if((date[0].month<2)||(date[0].month=2&&date[0].day!=29))
		{
			sum++;
		}
	}
	if((date[1].year%4==0&&date[1].year%100!=0)||(date[1].year%400==0))
	{
		if((date[1].month=2)||(date[1].month=2&&date[1].day!=29))
		{
			sum++;
		}
	}
	cout<<sum;
	return 0;
}


void main()
{
	int days[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int leap_days[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
	int sum,sum1,sum2;
	int startyear,startmonth,startday,endyear,endmonth,endday;
	scanf("%d %d %d\n%d %d %d",&startyear,&startmonth,&startday,&endyear,&endmonth,&endday);
	int totalfromfirstday (int year1,int month1,int day1,int year2,int month2,int day2);
    sum1=totalfromfirstday(startyear,1,1,startyear,startmonth,startday);
	sum2=totalfromfirstday(startyear,1,1,endyear,endmonth,endday);
	sum=sum2-sum1;
	printf("%d",sum);
}
int totalfromfirstday (int year1,int month1,int day1,int year2,int month2,int day2)
{
	int i,j,sum;
	int days[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int leap_days[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
	sum=day2;
	for (i=1;i<month2;i++)
	{
		if(((year2)%4==0&&(year2)%100!=0)||((year2)%400==0))
			sum=sum+leap_days[i];
		else
			sum=sum+days[i];
	}
	for (j=year1;j<year2;j++)
	{
		if ((j%4==0&&j%100!=0)||(j%400==0))
			sum=sum+366;
		else sum=sum+365;
	}
	return (sum);
}


int main()
{
	int startyear,startmonth,startday,rankstartday=0;
	int endyear,endmonth,endday,rankendday=0;
	cin >> startyear >> startmonth >> startday;
	cin >> endyear >> endmonth >> endday;
	int sum=0,year=0,month;
	int days1[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	int days2[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	if( startyear== endyear)
	{
		if( (startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0) )
		{
			for(month=1;month<startmonth;month++)
			{
				rankstartday=rankstartday+days2[month-1];
			}
			rankstartday=rankstartday+startday;
			for(month=1;month<endmonth;month++)
			{
				rankendday=rankendday+days2[month-1];
			}
			rankendday=rankendday+endday;
		}
		if( !((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0)) )
		{
			for(month=1;month<startmonth;month++)
			{
				rankstartday=rankstartday+days1[month-1];
			}
			rankstartday=rankstartday+startday;
			for(month=1;month<endmonth;month++)
			{
				rankendday=rankendday+days1[month-1];
			}
			rankendday=rankendday+endday;
		}
		sum = rankendday - rankstartday;
	}
	if ( startyear < endyear)
	{
		if( (startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0) )
		{
			for(month=1;month<startmonth;month++)
			{
				rankstartday=rankstartday+days2[month-1];
			}
			rankstartday=rankstartday+startday;
			sum=366-rankstartday;
		}
		if( !((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0)) )
		{
			for(month=1;month<startmonth;month++)
			{
				rankstartday=rankstartday+days1[month-1];
			}
			rankstartday=rankstartday+startday;
			sum=365-rankstartday;
		}
		for(year=startyear+1;year<endyear;year++)
		{
			if( (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0) )
			{
				sum=sum+366;
			}
			else sum=sum+365;
		}
		if( (endyear % 4 == 0 && endyear % 100 != 0) || (endyear % 400 == 0) )
		{
			for(month=1;month<endmonth;month++)
			{
				rankendday=rankendday+days2[month-1];
			}
			rankendday=rankendday+endday;
			sum=sum+rankendday;
		}
		if( !((endyear % 4 == 0 && endyear % 100 != 0) || (endyear % 400 == 0)) )
		{
			for(month=1;month<endmonth;month++)
			{
				rankendday=rankendday+days1[month-1];
			}
			rankendday=rankendday+endday;
			sum=sum+rankendday;
		}
	}
	cout << sum << endl;
	return 0;
}


int main()
{
	int startyear,endyear,startmonth,endmonth,startday,endday,i,answer;
	long int sumdays1=0,sumdays2=0;
	scanf("%d%d%d",&startyear,&startmonth,&startday);
	scanf("%d%d%d",&endyear,&endmonth,&endday);
	for(i=1;i<startyear;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
		{
			sumdays1+=366;
		}
		else
		{
			sumdays1+=365;
		}
	}
	if((startyear%4==0&&startyear%100!=0)||(startyear%400==0))
	{
		switch(startmonth)
		{
		case 1:sumdays1+=0;
			break;
		case 2:sumdays1+=31;
			break;
		case 3:sumdays1+=60;
			break;
		case 4:sumdays1+=91;
			break;
		case 5:sumdays1+=121;
			break;
		case 6:sumdays1+=152;
			break;
		case 7:sumdays1+=182;
			break;
		case 8:sumdays1+=213;
			break;
		case 9:sumdays1+=244;
			break;
		case 10:sumdays1+=274;
			break;
		case 11:sumdays1+=305;
			break;
		case 12:sumdays1+=335;
			break;
		}
	}
	else
	{
		switch(startmonth)
		{
		case 1:sumdays1+=0;
			break;
		case 2:sumdays1+=31;
			break;
		case 3:sumdays1+=59;
			break;
		case 4:sumdays1+=90;
			break;
		case 5:sumdays1+=120;
			break;
		case 6:sumdays1+=151;
			break;
		case 7:sumdays1+=181;
			break;
		case 8:sumdays1+=212;
			break;
		case 9:sumdays1+=243;
			break;
		case 10:sumdays1+=273;
			break;
		case 11:sumdays1+=304;
			break;
		case 12:sumdays1+=334;
			break;
		}
	}
	sumdays1+=startday;
	for(i=1;i<endyear;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
		{
			sumdays2+=366;
		}
		else
		{
			sumdays2+=365;
		}
	}
	if((endyear%4==0&&endyear%100!=0)||(endyear%400==0))
	{
		switch(endmonth)
		{
		case 1:sumdays2+=0;
			break;
		case 2:sumdays2+=31;
			break;
		case 3:sumdays2+=60;
			break;
		case 4:sumdays2+=91;
			break;
		case 5:sumdays2+=121;
			break;
		case 6:sumdays2+=152;
			break;
		case 7:sumdays2+=182;
			break;
		case 8:sumdays2+=213;
			break;
		case 9:sumdays2+=244;
			break;
		case 10:sumdays2+=274;
			break;
		case 11:sumdays2+=305;
			break;
		case 12:sumdays2+=335;
			break;
		}
	}
	else
	{
		switch(endmonth)
		{
		case 1:sumdays2+=0;
			break;
		case 2:sumdays2+=31;
			break;
		case 3:sumdays2+=59;
			break;
		case 4:sumdays2+=90;
			break;
		case 5:sumdays2+=120;
			break;
		case 6:sumdays2+=151;
			break;
		case 7:sumdays2+=181;
			break;
		case 8:sumdays2+=212;
			break;
		case 9:sumdays2+=243;
			break;
		case 10:sumdays2+=273;
			break;
		case 11:sumdays2+=304;
			break;
		case 12:sumdays2+=334;
			break;
		}
	}
	sumdays2+=endday;
	answer=sumdays2-sumdays1;
	printf("%d",answer);
	return 0;
}


int year1,year2,month1,month2,day1,day2;
int year[2][13]={{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}};
int month[25]={0,31,28,31,30,31,30,31,31,30,31,30,31,31,28,31,30,31,30,31,31,30,31,30,31};
int main()
{
	int count_year();

	int count_month();

	int count_day();

	int judge(int a);

	scanf("%d%d%d%d%d%d",&year1,&month1,&day1,&year2,&month2,&day2);
	printf("%d\n",(count_year()+count_month()+count_day()));

	return 0;
}
int judge(int a)
{
	if ((a % 4 == 0 && a % 100 != 0) || (a % 400 == 0))
		return 1;
	else
		return 0;
}
int count_year()
{
	int i,ans=0;
	for (i=year1+1;i<year2;i++)
		ans+=365+judge(i);
	return ans;
}
int count_month()
{
	int i,ans=0;
	if (year2>year1)
		month2+=12;
	month[2]=year[judge(year1)][2];
	month[14]=year[judge(year2)][2];
	for (i=month1+1;i<month2;i++)
		ans+=month[i];
	return ans;
}
int count_day()
{
	if (month2>month1)
		return (year[judge(year1)][month1]-day1+day2);
	else
		return (day2-day1);
}


int main()
{
	int startYear, startMonth, startDay, endYear, endMonth, endDay, month1[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, month2[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, count = 0, i, j;
	cin >> startYear >> startMonth >> startDay >> endYear >> endMonth >> endDay;
	if (startYear == endYear)
	{
		if (((startYear % 4 == 0) && startYear % 100 != 0) || (startYear % 400 == 0))
		{
			if (startMonth == endMonth)
			{
				count = endDay - startDay;
			}
			else
			{
				for (i = startMonth + 1; i <= endMonth; i++)
				{
					count += month2[i];
				}
				count += month2[startMonth] - startDay;
				count += endDay;
			}
		}
		else
		{
			if (startMonth == endMonth)
			{
				count = endDay - startDay;
			}
			else
			{
				for (i = startMonth + 1; i <= endMonth; i++)
				{
					count += month1[i];
				}
				count += month1[startMonth] - startDay;
				count += endDay;
			}
		}
	}
	else
	{
		for (j = startYear; j <= endYear; j++)
		{
			if (j == startYear)
			{
				if (((j % 4 == 0) && j % 100 != 0) || (j % 400 == 0))
				{
					for (i = startMonth + 1; i <= 12; i++)
						count += month2[i];
					count += month2[startMonth] - startDay;
				}
				else
				{
					for (i = startMonth + 1; i <= 12; i++)
						count += month1[i];
					count += month1[startMonth] - startDay;
				}
			}
			else if (j == endYear)
			{
				if (((j % 4 == 0) && j % 100 != 0) || (j % 400 == 0))
				{
					for (i = 1; i <= endMonth - 1; i++)
						count += month2[i];
					count += endDay;
				}
				else
				{
					for (i = 1; i <= endMonth - 1; i++)
						count += month1[i];
					count += endDay;
				}
			}
			else
			{
				if (((j % 4 == 0) && j % 100 != 0) || (j % 400 == 0))
				{
					count += 366;
				}
				else
				{
					count += 365;
				}
			}
		}
	}
	cout << count;
	return 0;
}


int main()
{
	int year1, month1, day1;
	int year2, month2, day2;
	int total=0;

	scanf("%d%d%d%d%d%d",&year1,&month1,&day1,&year2,&month2,&day2);

	for (; ; ) {
		if (year1 == year2 && month1 == month2 && day1 == day2) {
			break;
		}
		else {
			if (day1 == 31) {
				if (month1 == 1 || month1 == 3 || month1 == 5 || month1 == 7 || month1 == 8 || month1 == 10) {
					month1 ++;
					day1 = 0;
				}
				else if (month1 == 12) {
					day1 = 0;
					month1 = 1;
					year1 ++;
				}
			}
			else if(day1 == 30){
				if(month1 == 4 || month1 == 6 || month1 == 9 || month1 == 11) {
					month1 ++;
					day1 = 0;
				}
			}
			else if(day1 == 28) {
				if (month1 == 2) {
					if ((year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0)) {
						day1 = 0;
						month1 ++;
						total ++;
					}
					else {
						day1 = 0;
						month1 ++;
					}
				}
			}
		}
		total ++;
		day1 ++;
	}
	printf("%d",total);
	return 0;
}


int main()
{int k,i,j,year1,year2,month1,month2,day1,day2;
 int month[13];
 month[1]=31;
 month[3]=31;
 month[5]=31;
 month[7]=31;
 month[8]=31;
 month[10]=31;
 month[12]=31;
 month[4]=30;
 month[6]=30;
 month[9]=30;
 month[11]=30;
 int day_number,that_year_day1=0,that_year_day2=0;
 day_number=0;
 scanf("%d%d%d\n",&year1,&month1,&day1);
 scanf("%d%d%d\n",&year2,&month2,&day2);
 for (i=year1;i<=year2-1;i++)
 { if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
      month[2]=29;
   else month[2]=28;
   for (j=1;j<=12;j++)
	   day_number=day_number+month[j];
 }
 if ((year1 % 4 == 0 && year1 % 100 != 0) || (year1 % 400 == 0))
	{ month[2]=29;}
 else month[2]=28;
 for (k=1;k<=month1-1;k++)
	 that_year_day1+=month[k];
 that_year_day1+=day1;
 if ((year2 % 4 == 0 && year2 % 100 != 0) || (year2 % 400 == 0))
	{ month[2]=29;}
 else month[2]=28;
 for (k=1;k<=month2-1;k++)
	 that_year_day2+=month[k];
 that_year_day2+=day2;
 day_number=day_number-that_year_day1+that_year_day2;
 printf("%d",day_number);
 }