semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int sY,sM,sD,eY,eM,eD,d1,i,d2,j,d3,k,d;
	scanf("%d%d%d\n",&sY,&sM,&sD);
	scanf("%d%d%d",&eY,&eM,&eD);
	d1=(sM-1)*31+sD;
	sM=sM-1;
	for(i=0;sM>=1;sM=sM-1)
	{
		if(sM==4||sM==6||sM==9||sM==11)
		{
			i=i+1;
		}
		else if(sM==2)
		{
			if((sY%4==0&&sY%100!=0)||(sY%400==0))
			{
				i=i+2;
			}
			else 
			{
				i=i+3;
			}
		}
	}
	d1=d1-i;
	d2=(13-eM)*31-eD;
	for(j=0;eM<=12;eM=eM+1)
	{
        if(eM==4||eM==6||eM==9||eM==11)
		{
			j++;
		}
	
		else if(eM==2)
		{
			if((eY%4==0&&eY%100!=0)||(eY%400==0))
			{
				j=j+2;
			}
			else 
			{
				j=j+3;
			}
		}
	}
	d2=d2-j;
    d3=(eY-sY+1)*365;
	for(k=0;sY<=eY;sY=sY+1)
		{
			if((sY%4==0&&sY%100!=0)||(sY%400==0))
				k++;
		}
	d3=d3+k;
	d=d3-d1-d2;
	printf("%d",d);
}
int main()
{
	int sy, sm, sd, ey, em, ed, n;
	int year(int y);
	int mouth(int m, int y);
	int day(int d);
	scanf("%d%d%d%d%d%d", &sy, &sm, &sd, &ey, &em, &ed);
	n=year(ey)+mouth(em, ey)+day(ed)-year(sy)-mouth(sm, sy)-day(sd);
    printf("%d\n", n);
	return 0;
}

int year(int y)
{
	int i, sum=0;
	for(i=1000;i<y;i++)
	{
		if((i%4==0 && i%100!=0) || (i%400==0))
        sum=sum+366;
		else sum=sum+365;
	}
	return(sum);
}

int mouth(int m, int y)
{
	int i, sum=0;
	if((y%4==0 && y%100!=0) || (y%400==0))
	{
		for(i=1;i<m;i++)
		{
			if(i==1 || i==3 || i==5 || i==7 || i==8 || i==10 || i==12)
				sum=sum+31;
			else if(i==2)
				sum=sum+29;
			else sum=sum+30;
		}
	}
	else
	{
		for(i=1;i<m;i++)
		{
			if(i==1 || i==3 || i==5 || i==7 || i==8 || i==10 || i==12)
				sum=sum+31;
			else if(i==2)
				sum=sum+28;
			else sum=sum+30;
		}
	}
	return(sum);
}

int day(int d)
{	
	return(d-1);
}
//*************************************************
//***??????????????***
//***??????***
//***???2013.1.13***
//*************************************************
int main ()
{
	int mon[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
	int sy,sm,sd,ey,em,ed,distance,i,d1 = 0,d2 = 0;
	cin >> sy >> sm >> sd;
	cin >> ey >> em >> ed;
	distance = 0;
	for (i = sy; i < ey; i++)
	{
		if ((i % 4 == 0 && i % 100 != 0) || i % 400 == 0)
			distance += 366;
		else
			distance += 365;
	}
	if ((sy % 4 == 0 && sy % 100 != 0) || sy % 400 == 0)
		mon[1] = 29;
	else
		mon[1] = 28;
	for (i = 0; i < sm - 1; i++)
	{
		d1 += mon[i];
	}
	d1 += sd;
	if ((ey % 4 == 0 && ey % 100 != 0) || ey % 400 == 0)
		mon[1] = 29;
	else
		mon[1] = 28;
	for (i = 0; i < em - 1; i++)
	{
		d2 += mon[i];
	}
	d2 += ed;
	distance += d2 - d1;
	cout << distance  << endl;
	return 0;
}
int main()
{
	int y1,y2,mon1,mon2,da1,da2,days=0;
	cin>>y1>>mon1>>da1>>y2>>mon2>>da2;
	while(y2>y1)
	{
		if(((y1) % 4 == 0 && (y1) %100!= 0)|| ((y1) % 400 == 0))
		{days=days+366;y1=y1+1;}
		else {days=days+365;y1=y1+1;}
	}
	while(mon2>mon1)
	{
		if(((y1) % 4 == 0 && (y1) %100!= 0)|| ((y1) % 400 == 0))
		{if(mon1==1||mon1==3||mon1==5||mon1==7||mon1==8||mon1==10||mon1==12)
		  {days=days+31;mon1=mon1+1;}
		  else if(mon1==2){days=days+29;mon1=mon1+1;}
		  else {days=days+30;mon1=mon1+1;}
		 }
	else {
		  if(mon1==1||mon1==3||mon1==5||mon1==7||mon1==8||mon1==10||mon1==12)
		{days=days+31;mon1=mon1+1;}
		    else if(mon1==2){days=days+28;mon1=mon1+1;}
			else {days=days+30;mon1=mon1+1;}
	     }

	     }
	while(mon2<mon1)
	{
		if(((y1) % 4 == 0 && (y1) %100!= 0)|| ((y1) % 400 == 0))
		{if(mon2==1||mon2==3||mon2==5||mon2==7||mon2==8||mon2==10||mon2==12)
		  {days=days-31;mon2=mon2+1;}
		  else if(mon2==2){days=days-29;mon2=mon2+1;}
		  else {days=days-30;mon2=mon2+1;}
		 }
	else {
		  if(mon2==1||mon2==3||mon2==5||mon2==7||mon2==8||mon2==10||mon2==12)
		{days=days-31;mon2=mon2+1;}
		    else if(mon2==2){days=days-28;mon2=mon2+1;}
			else {days=days-30;mon2=mon2+1;}
	     }

	     }
	days=days+(da2-da1);
	
	cout<<days;
}
int main()
{
  int y1,m1,d1,y2,m2,d2,i,days;
  int day[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
  scanf("%d%d%d%d%d%d",&y1,&m1,&d1,&y2,&m2,&d2);
  days=0;
  if (y1==y2)
  {
		while ((m1<m2)||((m1==m2)&&(d1<d2)))
		{
			if ((y1%4==0&&y1%100!=0)||(y1%400==0))
			{day[2]++;}
			d1++;
			days++;
			if (d1>day[m1])
			{
				d1=0;
				m1++; 
			}
		}
  }
  else
  {
	  for (i=y1+1;i<=y2-1;i++){
		  if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))days+=366;
		  else days+=365;
	  }
      days+=day[m1]-d1;
	  for (i=m1+1;i<=12;i++) days+=day[i];
	  if ((m1==1)&&((y1%4==0&&y1%100!=0)||(y1%400==0))){days++;}
	  for (i=1;i<=m2-1;i++) days+=day[i];
         if ((m2>2)&&((y2%4==0&&y2%100!=0)||(y2%400==0))){days++;}
         days+=d2;
  }
   printf("%d",days);
   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 leap(int year)
{
	return year%4==0&&year%100!=0 || year%400==0;
}

int daysum(int year,int month,int day)
{
	int i,c=day;
	for(i=1;i<month;i++)
		if(leap(year)) c+=leap_days[i];
		else c+=days[i];
	return c;
}

void main()
{
	int y1,m1,d1,y2,m2,d2,i,n=0,a,b;
	scanf("%d%d%d%d%d%d",&y1,&m1,&d1,&y2,&m2,&d2);
	for(i=y1+1;i<y2;i++)
	{
		n+=leap(i)?366:365;
	}
	if(y1==y2) n=daysum(y2,m2,d2)-daysum(y1,m1,d1);
	else 
	{
		n=n+daysum(y2,m2,d2)+365-daysum(y1,m1,d1);
		if(leap(y1)) n++;
	}
	printf("%d",n);
}
int leap(int);
int main()
{
	int total[13]={0,31,59,90,120,151,181,212,243,273,304,334,365};
	int y1,y2,m1,m2,d1,d2;
	int sum=0,j;
	scanf("%d %d %d %d %d %d",&y1,&m1,&d1,&y2,&m2,&d2);
	/*??????????????2????*/ 
	if (y1==y2){
	   	  if (leap(y1)==0)  
			 sum+=total[m2-1]-total[m1-1]+d2-d1;       
	   	  if (leap(y1)==1&&m2>2)  
			 sum+=total[m2-1]-total[m1-1]+d2-d1+1; 
	}
	/*?????????????????????2???*/ 
	if (y2>y1){
       for(j=y1+1;j<y2;j++){
          if (leap(j)==1) sum+=366;
          else if (leap(j)==0) sum+=365;
       }
       
	   if (leap(y1)==0)  
	      sum+=365-total[m1-1]-d1;
	   else if (m1<=2)  
	      sum+=365-total[m1-1]-d1+1;
       
	   if (leap(y2)==0)  
	      sum+=total[m2-1]+d2;
       else if (m2>2)   
	      sum+=total[m2-1]+d2+1;
	}  
	printf("%d",sum);
	return 0;
}

int leap(int y){
	return y%400 == 0 || y%4 == 0 && y%100 != 0;
}
/*
 * dates.cpp
 *
 *  Created on: 2011-11-4
 *      Author: admin
 */
int main(){
int startYear,startMonth,startDay,endYear,endMonth,endDay,i,day1=0,day2=0,day3=0;
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};
cin>>startYear>>startMonth>>startDay>>endYear>>endMonth>>endDay;
if((startYear%4==0)&&(startYear%100!=0)||(startYear%400==0)){
	for (i=1;i<=startMonth-1;i++){
		day1=b[i]+day1;
	}
	day1=day1+startDay;
}
else {
	for (i=1;i<=startMonth-1;i++){
    day1=a[i]+day1;
	}
    day1=day1+startDay;
}
if((endYear%4==0)&&(endYear%100!=0)||(endYear%400==0)){
	for (i=1;i<=endMonth-1;i++){
		day2=b[i]+day2;
	}
	day2=day2+endDay;
}
else{
	for (i=1;i<=endMonth-1;i++){
		day2=a[i]+day2;
	}
	day2=day2+endDay;
}
for (i=startYear;i<=endYear-1;i++){
	if((i%4==0)&&(i%100!=0)||(i%400==0))day3=day3+366;
	else day3=day3+365;
}
cout<<day3+day2-day1;
return 0;
}
int main()
{
	int a[3],b[3],i,year = 0,count  = 0,sum = 0,sum1 = 0,flag = 0;
	for(i = 0; i < 3; i++)
		cin >> a[i];
	for(i = 0; i< 3; i++)
		cin >> b[i];
	year = b[0] - a[0] - 1;
	for(i = a[0] + 1;i<b[0];i++)
	{
       if((i % 4 == 0 && i % 100 != 0)||(i % 400 == 0))
		   count++;
	}
    sum = sum + 365*year + count;
	if((a[0] % 4 == 0&&a[0] % 100 != 0)||(a[0] % 400 == 0))
		flag = 1;
	for(i = 1; i < a[1]; i++)
	{
		if((i==1)||(i == 3)||(i == 5)||(i == 7)||(i == 8)||(i == 10)||(i==12))
			sum1 = sum1 + 31;
		else if((i == 4)||(i == 6)||(i == 9)||(i == 11))
			sum1= sum1+ 30;
		else if(i == 2)
		{
			if(flag == 1)
			{
				sum1=sum1+ 29;
			    
			}
			else sum1 = sum1 + 28;
		}
	}
     sum1 = sum1 + a[2];
	 sum = sum + 365 +flag - sum1;
	 for(i  = 1; i < b[1]; i++)
	 {

		if((i==1)||(i == 3)||(i == 5)||(i == 7)||(i == 8)||(i == 10)||(i==12))
			sum = sum + 31;
		else if((i == 4)||(i == 6)||(i == 9)||(i == 11))
			sum= sum+ 30;
		else if(i == 2)
		{
			if((b[0] % 4 == 0&&b[0] % 100 != 0)||(b[0] % 400 == 0))
			sum=sum+ 29;
		
			else sum = sum + 28;
		}
	 }
	 sum = sum + b[2];
	 cout << sum << endl;
	 
	 return 0;
}
int main()
{
	int year[3001]={0},deta=0,year1,year2,mon1,mon2,day1,day2,i;
	int mon[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	for(i=1;i<=3001;i++)
	{
		year[i]=365;
	}
	for(i=1;i<=3001;i++)
	{
		if((i%4==0&&i%100!=0)||(i % 400==0)) 
		year[i]=366;
	}

	cin>>year1>>mon1>>day1;
	cin>>year2>>mon2>>day2;

	if(year2%4==0)
	{
		deta=1;
	}

	if((year2%4==0&&year2%100!=0)||(year2 % 400==0)) 
	{
		mon[2]=28;
	}


    for(i=year1;i<year2;i++)
	{
		deta+=year[i];
	}

	if(mon1>mon2)
	{
		for(i=mon2;i<mon1;i++)
		{
			deta-=mon[i];
		}
	}

	if(mon2>mon1)
	{
		for(i=mon1;i<mon2;i++)
		{
			deta+=mon[i];
		}
	}

	deta=deta+day2-day1;



	cout<<deta<<endl;



	return 0;



}
int main()
{
	int i,t;
	int startyear,startMonth,startDay;
	int endyear,endMonth,endDay;
	int day,a,b,m=0,n=0;
	scanf("%d%d%d",&startyear,&startMonth,&startDay);
	scanf("%d%d%d",&endyear,&endMonth,&endDay);
    if((startyear%4==0 && startyear%100!=0) || (startyear%400==0))
	{
		switch(startMonth)
		{
		case 1:a=startDay-32;
			break;
		case 2:a=startDay-1;
			break;
		case 3:a=28+startDay;
			break;
		case 4:a=59+startDay;
			break;
		case 5:a=89+startDay;
			break;
		case 6:a=120+startDay;
			break;
		case 7:a=150+startDay;
			break;
		case 8:a=181+startDay;
			break;
		case 9:a=212+startDay;
			break;
		case 10:a=242+startDay;
			break;
		case 11:a=273+startDay;
			break;
		case 12:a=303+startDay;
			break;
		}
	}
		else
		{
	    switch(startMonth)
		{
		case 1:a=startDay-32;
			break;
		case 2:a=startDay-1;
			break;
		case 3:a=28+startDay-1;
			break;
		case 4:a=59+startDay-1;
			break;
		case 5:a=89+startDay-1;
			break;
		case 6:a=120+startDay-1;
			break;
		case 7:a=150+startDay-1;
			break;
		case 8:a=181+startDay-1;
			break;
		case 9:a=212+startDay-1;
			break;
		case 10:a=242+startDay-1;
			break;
		case 11:a=273+startDay-1;
			break;
		case 12:a=303+startDay-1;
			break;
		}
		}
	 if((endyear%4==0 && endyear%100!=0) || (endyear%400==0))
	{
		switch(endMonth)
		{
		case 1:b=endDay-32;
			break;
		case 2:b=endDay-1;
			break;
		case 3:b=28+endDay;
			break;
		case 4:b=59+endDay;
			break;
		case 5:b=89+endDay;
			break;
		case 6:b=120+endDay;
			break;
		case 7:b=150+endDay;
			break;
		case 8:b=181+endDay;
			break;
		case 9:b=212+endDay;
			break;
		case 10:b=242+endDay;
			break;
		case 11:b=273+endDay;
			break;
		case 12:b=303+endDay;
			break;
		}
	 }
		else
		{
	    switch(endMonth)
		{
		case 1:b=endDay-32;
			break;
		case 2:b=endDay-1;
			break;
		case 3:b=28+endDay-1;
			break;
		case 4:b=59+endDay-1;
			break;
		case 5:b=89+endDay-1;
			break;
		case 6:b=120+endDay-1;
			break;
		case 7:b=150+endDay-1;
			break;
		case 8:b=181+endDay-1;
			break;
		case 9:b=212+endDay-1;
			break;
		case 10:b=242+endDay-1;
			break;
		case 11:b=273+endDay-1;
			break;
		case 12:b=303+endDay-1;
			break;
		}
		}
		if(startyear>endyear)
		{
			t=endyear;
			endyear=startyear;
			startyear=t;
		}
		for(i=startyear;i<endyear;i++)
		{
			if((i%4==0 && i%100!=0) || (i%400==0))
				m=m+1;
		}
        if(startyear==endyear)
			n=0,m=0;
		else
		n=endyear-startyear-m;
		day=(366*m+365*n-a+b);
		printf("%d",day);
		return 0;
		}
/*
 * 3.cpp
 *
 *  Created on: 2011-1-9
 *      Author: jsgl
 */

int ifrun(int year)
{
    if(year%4!=0) return 0;
    else {
    	if(year%100!=0) return 1;
    	else
    	{
    		if(year%400==0) return 1;
    		else return 0;
    	}
    }
}
int jisuan(int y, int m, int d)
{
	if(m==1) return d;
	else if(m==2) return 31+d;
	else if(m==3) return 31+28+d+ifrun(y);
	else if(m==4) return 31+28+31+d+ifrun(y);
	else if(m==5) return 30+31+28+31+d+ifrun(y);
	else if(m==6) return 31+30+31+28+31+d+ifrun(y);
	else if(m==7) return 30+31+30+31+28+31+d+ifrun(y);
	else if(m==8) return 31+30+31+30+31+28+31+d+ifrun(y);
	else if(m==9) return 31+31+30+31+30+31+28+31+d+ifrun(y);
	else if(m==10) return 30+31+31+30+31+30+31+28+31+d+ifrun(y);
	else if(m==11) return 31+30+31+31+30+31+30+31+28+31+d+ifrun(y);
	else return 30+31+30+31+31+30+31+30+31+28+31+d+ifrun(y);
}
int main()
{
	int y1, y2, m1, m2, d1, d2;
	cin>>y1>>m1>>d1;
	cin>>y2>>m2>>d2;
	int k, sum=0;
	for(int i=y1; i<y2; i++)
	{

		if(ifrun(i)==1) sum=sum+366;
		else sum=sum+365;
	}
	k=sum+jisuan(y2,m2,d2)-jisuan(y1,m1,d1);

    cout<<k;
	return 0;

}
int main()
{
    int sy,sm,sd,ey,em,ed;
    cin>>sy>>sm>>sd>>ey>>em>>ed;
    int py[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
    int ry[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
    int count=0;
    int year=sy;
    if(sy!=ey)
    {
              
              if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
            {
                     for(int m=sm;m<12;m++)
                    {
                            {
                                           count+=ry[m];
                            }
                    }
            }
            else
            {
                     for(int m=sm;m<12;m++)
                    {
                            {
                                           count+=py[m];
                            }
                    }
            }
            count+=32-sd;
            sy+=1;sd=1;sm=1;
    }
    for(;sy<ey;sy++)
    {
            if((sy % 4 == 0 && sy % 100 != 0) || (sy % 400 == 0))
            count+=366;
            else
            count+=365;
    }
    year=ey;
     if(sm!=em)
     {
              if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
              {
                       for(int m=sm;m<em;m++)
                        {
                                {
                                               count+=ry[m];
                                }
                        }
              }
              else
              {
                       for(int m=sm;m<em;m++)
                        {
                                {
                                               count+=py[m];
                                }
                        }
              }
              
     }
     count+=ed-sd;
     cout<<count<<endl;
     return 0;
}
int main()
{
	int y1,y2,m1,m2,d1,d2;
	int i,j,a;
	i=1;
	j=1;
	scanf("%d %d %d",&y1,&m1,&d1);
	scanf("%d %d %d",&y2,&m2,&d2);
	int leap;
	long int yi;
	yi=0;
	while (i<y1)
	{
		if(i%4==0)
		{
			if(i%100==0)
			{
				if(i%400==0)
					leap=1;
				else
					leap=0;
			}
			else leap=1;
		}
		else
			leap=0;
		i++;
		if(leap)
			yi=yi+366;
		else
			yi=yi+365;
	}
	int l;
	if(y1%4==0)
		{
			if(y1%100==0)
			{
				if(y1%400==0)
					l=1;
				else
					l=0;
			}
			else l=1;
		}
		else
			l=0;
		if(l=1)
			switch(m1)
{
case 1:yi=yi+d1;break;
case 2:yi=yi+31+d1;break;
case 3:yi=yi+31+29+d1;break;
case 4:yi=yi+31+29+31+d1;break;
case 5:yi=yi+31+29+31+30+d1;break;
case 6:yi=yi+31+29+31+30+31+d1;break;
case 7:yi=yi+31+29+31+30+31+30+d1;break;
case 8:yi=yi+31+29+31+30+31+30+31+d1;break;
case 9:yi=yi+31+29+31+30+31+30+31+31+d1;break;
case 10:yi=yi+31+29+31+30+31+30+31+31+30+d1;break;
case 11:yi=yi+31+29+31+30+31+30+31+31+30+31+d1;break;
case 12:yi=yi+31+29+31+30+31+30+31+31+30+31+30+d1;break;
		}
		else
			switch(m1)
{
case 1 :yi=yi+d1;break;
case 2 :yi=yi+31+d1;break;
case 3 :yi=yi+31+28+d1;break;
case 4 :yi=yi+31+28+31+d1;break;
case 5 :yi=yi+31+28+31+30+d1;break;
case 6 :yi=yi+31+28+31+30+31+d1;break;
case 7 :yi=yi+31+28+31+30+31+30+d1;break;
case 8 :yi=yi+31+28+31+30+31+30+31+d1;break;
case 9 :yi=yi+31+28+31+30+31+30+31+31+d1;break;
case 10 :yi=yi+31+28+31+30+31+30+31+31+30+d1;break;
case 11 :yi=yi+31+28+31+30+31+30+31+31+30+31+d1;break;
case 12 :yi=yi+31+28+31+30+31+30+31+31+30+31+30+d1;break;
		}
long int yj;
yj=0;
while (j<y2)
	{
		if(j%4==0)
		{
			if(j%100==0)
			{
				if(j%400==0)
					leap=1;
				else
					leap=0;
			}
			else leap=1;
		}
		else
			leap=0;
		j++;
		if(leap)
			yj=yj+366;
		else
			yj=yj+365;
	}
	int l2;
	if(y2%4==0)
		{
			if(y2%100==0)
			{
				if(y2%400==0)
					l2=1;
				else
					l2=0;
			}
			else l2=1;
		}
		else
			l2=0;
		if(l2=1)
			switch(m2)
{
case 1 :yj=yj+d2;break;
case 2 :yj=yj+31+d2;break;
case 3 :yj=yj+31+29+d2;break;
case 4 :yj=yj+31+29+31+d2;break;
case 5 :yj=yj+31+29+31+30+d2;break;
case 6 :yj=yj+31+29+31+30+31+d2;break;
case 7 :yj=yj+31+29+31+30+31+30+d2;break;
case 8 :yj=yj+31+29+31+30+31+30+31+d2;break;
case 9 :yj=yj+31+29+31+30+31+30+31+31+d2;break;
case 10 :yj=yj+31+29+31+30+31+30+31+31+30+d2;break;
case 11 :yj=yj+31+29+31+30+31+30+31+31+30+31+d2;break;
case 12 :yj=yj+31+29+31+30+31+30+31+31+30+31+30+d2;break;
		}
		else
			switch(m2)
{
case 1 :yj=yj+d2;break;
case 2 :yj=yj+31+d2;break;
case 3 :yj=yj+31+28+d2;break;
case 4 :yj=yj+31+28+31+d2;break;
case 5 :yj=yj+31+28+31+30+d2;break;
case 6 :yj=yj+31+28+31+30+31+d2;break;
case 7 :yj=yj+31+28+31+30+31+30+d2;break;
case 8 :yj=yj+31+28+31+30+31+30+31+d2;break;
case 9 :yj=yj+31+28+31+30+31+30+31+31+d2;break;
case 10 :yj=yj+31+28+31+30+31+30+31+31+30+d2;break;
case 11 :yj=yj+31+28+31+30+31+30+31+31+30+31+d2;break;
case 12 :yj=yj+31+28+31+30+31+30+31+31+30+31+30+d2;break;
		}
	a=yj-yi;
	printf("%d",a);
	return 0;

}
int main()
{
	int a[3],b[3];
	int i,da=0,d=0;
	
	for(i=0;i<=2;i++)
		scanf("%d",&a[i]);
    
	for(i=0;i<=2;i++)
		scanf("%d",&b[i]);
	
    int leap (int year);

	for(a[1]--;a[1]>=1;a[1]--)
	{
		switch(a[1])
		{
		case 1:
		case 3:
		case 5:
		case 7:
		case 8:
		case 10:
		
		case 12:da=da+31;break;
		case 4:
		case 6:
		case 9:
		case 11:da=da+30;break;
		
		case 2:
			{
				if(leap(a[0])) da=da+29;
				else da=da+28;
			}
		}
	}
      
	da=da+a[2];//A??????
		
		for(b[1]--;b[1]>=1;b[1]--)
		{ 

		switch(b[1])
		{
		case 1:
		case 3:
		case 5:
		case 7:
		case 8:
		case 10:
		
		case 12:d=d+31;break;
		case 4:
		case 6:
		case 9:
		case 11:d=d+30;break;
		
		case 2:
			{
				if(leap(b[0])) d=d+29;
				else d=d+28;
			}
		}
		}
    d=d+b[2];//B??????

	for(;a[0]<b[0];a[0]++)//???????
	{
			if(leap(a[0]))
				d=d+366;
			else d=d+365;
	}
	printf("%d\n",d-da);
	return 0;
}

int leap (int year)//LEAP YEAR OR NOT
	{
        int LEAP;
		if(year%4==0&&year%100!=0||year%400==0)
           LEAP=1;
		else LEAP=0;
		return LEAP;
	}
void main()
{
	int a,b,c,e,f,g,m,n,t,q;
	scanf("%d %d %d\n %d %d %d", &a,&b,&c,&e,&f,&g);
	
	m=0;n=0;q=0;
		
	if (b==1) {	n=365-c;}
	if (b==2) {	n=365-(31+c);}
	if (b==3) {	n=365-(59+c);}
	if (b==4) {	n=365-(90+c);}
	if (b==5) {	n=365-(120+c);}
	if (b==6) {	n=365-(151+c);}
	if (b==7) {	n=365-(181+c);}
	if (b==8) {	n=365-(212+c);}
	if (b==9) {	n=365-(243+c);}
	if (b==10) {	n=365-(273+c);}
	if (b==11) {	n=365-(304+c);}
	if (b==12) {	n=365-(334+c);}
	else ;

	if(f==1) {m=g;}
	if(f==2) {m=31+g;}
	if(f==3) {m=59+g;}
	if(f==4) {m=90+g;}
	if(f==5) {m=120+g;}
	if(f==6) {m=151+g;}
	if(f==7) {m=181+g;}
	if(f==8) {m=212+g;}
	if(f==9) {m=243+g;}
	if(f==10) {m=273+g;}
	if(f==11) {m=304+g;}
	if(f==12) {m=334+g;}
	else;

	q=m+n;
	if (a==e) {q=m-(365-n);
		if ((a % 4 == 0 && a % 100 !=0) || (a % 400 == 0) && b<=2)
			q=q+1;
		else q=q;}
	else {t=e-a-1; q=q+365*t;
		do
			{	if ((a % 4 == 0 && a % 100 !=0) || (a % 400 == 0))
			{q=q+1; a=a+1;}
			else a=a+1;
			}
		while(a<=e);
		}

	printf("%d",q);
}
main()
{
	int year1,year2,m1,m2,d1,d2,days=0,total1=0,total2=0,i;
	scanf("%d %d %d",&year1,&m1,&d1);
	scanf("%d %d %d",&year2,&m2,&d2);
	for(i=1;i<m1;i++)
	{
		if(i==1 || i==3 || i==5 || i==7 || i==8 || i==10 || i==12)
			total1=total1+31;
		if(i==4 || i==6 || i==9 || i==11)
			total1=total1+30;
		if(i==2)
		{
			if((year1%4==0 && year1%100!=0) || year1%400==0)
				total1=total1+29;
			else total1=total1+28;
		}
	}
	total1=total1+d1;
	/*printf("%d\n",total1);*/
	for(i=1;i<m2;i++)
	{
		if(i==1 || i==3 || i==5 || i==7 || i==8 || i==10 || i==12)
			total2=total2+31;
		if(i==4 || i==6 || i==9 || i==11)
			total2=total2+30;
		if(i==2)
		{
			if((year2%4==0 && year2%100!=0) || year2%400==0)
				total2=total2+29;
			else total2=total2+28;
		}
	}
	total2=total2+d2;
	/*printf("%d\n",total2);*/
	for(i=year1;i<year2;i++)
	{
		if((i%4==0 && i%100!=0) || i%400==0)
			days=days+366;
		else days=days+365;
	}
	if(total1<=total2)
		days=days+total2-total1;
	else days=days-(total1-total2);
	printf("%d",days);
}
int main()
{
	int days[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}},year1,year2,month1,month2,day1,day2;
    int Count=0,i,j,k;

	cin>>year1>>month1>>day1>>year2>>month2>>day2;
	for(i=year1,j=month1,k=day1;i<year2||j<month2||k<day2;Count++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))//??
		{
			if(k<days[1][j-1])
				k++;
			else
			{
				k=1;
				if(j<12)
					j++;
				else
				{
					i++;
					j=1;
				}
			}
		}
		else
		{
			if(k<days[0][j-1])
				k++;
			else
			{
				k=1;
				if(j<12)
					j++;
				else
				{
					i++;
					j=1;
				}
			}
		}
	}
	cout<<Count;
	
	return 0;
}
int main ()
{
	int y1,y2,m1,m2,d1,d2,i,j,sum=0,k,m,year;
	cin >>y1>>m1>>d1;
	cin >>y2>>m2>>d2;
	if (y1<y2)
	{
		for (i=y1+1;i<y2;i++)
		{
			if ((i % 4 == 0 && i% 100 != 0) || (i % 400 == 0))
				sum+=366;
			else sum+=365;
		}
		year=y1;
		for (i=m1+1;i<=12;i++)
		{
			switch (i)
			{
				case 1:
				case 3:
				case 5:
				case 7:
				case 8:
				case 10:
				case 12: m=31;break;
				case 2:  if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) 
							 m=29;
						 else m=28;
						 break;
				case 4:
				case 6:
				case 9:
				case 11: m=30;break;
			}
			sum+=m;
		}
		switch (m1)
		{
			case 1:
			case 3:
			case 5:
			case 7:
			case 8:
			case 10:
			case 12: m=31;break;
			case 2:  if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) 
							m=29;
						else m=28;
						break;
			case 4:
			case 6:
			case 9:
			case 11: m=30;break;
		}
		sum +=m-d1;
		year =y2;
		for (i=1;i<m2;i++)
		{
			switch (i)
			{
				case 1:
				case 3:
				case 5:
				case 7:
				case 8:
				case 10:
				case 12: m=31;break;
				case 2:  if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) 
							 m=29;
						 else m=28;
						 break;
				case 4:
				case 6:
				case 9:
				case 11: m=30;break;
			}
			sum+=m;
		}
		sum+=d2;
	}
	if (y1==y2)
	{
		if (m1<m2)
		{
			for (i=m1;i<m2;i++)
			{
				switch (i)
				{
					case 1:
					case 3:
					case 5:
					case 7:
					case 8:
					case 10:
					case 12: m=31;break;
					case 2:  if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) 
								 m=29;
							 else m=28;
							 break;
					case 4:
					case 6:
					case 9:
					case 11: m=30;break;
				}
				sum+=m;
			}
			sum+=d2;
			switch (m1)
			{
				case 1:
				case 3:
				case 5:
				case 7:
				case 8:
				case 10:
				case 12: m=31;break;
				case 2:  if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) 
								m=29;
							else m=28;
							break;
				case 4:
				case 6:
				case 9:
				case 11: m=30;break;
			}
			sum+=m-d1;
		}
		if (m1==m2)
			sum=d2-d1;
	}
	cout <<sum<<endl;

	return 0;
}