semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int STARTyear,STARTmonth,STARTday,ENDyear,ENDmonth,ENDday;
	int i;
	int Pyear[12],Ryear[12];
	int STARTdate,ENDdate,date;
	int a[12]={0,31,28,31,30,31,30,31,31,30,31,30};
	int b[12]={0,31,29,31,30,31,30,31,31,30,31,30};
	int disyear[402]={0,0};
	Pyear[0]=a[0];
	Ryear[0]=b[0];
	for( i=1 ; i<12 ; i++ )
	{
		Pyear[i]=Pyear[i-1]+a[i];
		Ryear[i]=Ryear[i-1]+b[i];
	}
	cin>>STARTyear>>STARTmonth>>STARTday
		>>ENDyear>>ENDmonth>>ENDday;
	if( (STARTyear % 4 == 0 && STARTyear % 100 != 0) || (STARTyear % 400 == 0) )
	{
		STARTdate=Ryear[STARTmonth-1]+STARTday-1;
	}
	else
	{
		STARTdate=Pyear[STARTmonth-1]+STARTday-1;
	}
	if( (ENDyear % 4 == 0 && ENDyear % 100 != 0) || (ENDyear % 400 == 0) )
	{
		ENDdate=Ryear[ENDmonth-1]+ENDday-1;
	}
	else
	{
		ENDdate=Pyear[ENDmonth-1]+ENDday-1;
	}
	for( i=1 ; i<401 ; i++ )
	{
		if( i%4!=0 || ( i%100==0 && i%400!=0 ) )
		{
			disyear[i+1]=disyear[i]+365;
		}
		else
		{
			disyear[i+1]=disyear[i]+366;
		}
	}
	
	for( i=1 ; i<401 ; i++ )
	{
		if( STARTyear%400==i%400 )
		{
			STARTdate+=disyear[401]*( (STARTyear-i)/400 )+disyear[i];
		}
		if( ENDyear%400==i%400 )
		{
			ENDdate+=disyear[401]*( (ENDyear-i)/400 )+disyear[i];
		}
	}
	date=ENDdate-STARTdate;
	cout<<date<<endl;
}
void main()
{
	int y1,m1,d1;
	int y2,m2,d2;
	int days=0,month,year;
	scanf("%d%d%d%d%d%d",&y1,&m1,&d1,&y2,&m2,&d2);
    for(year=y1+1;year<y2;year++)
	{
		if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) days=days+366;
		else days=days+365;
	}
	if(((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))&&m1<=2) days=days+1;
	for(month=m1;month<=12;month++)
	{
    switch(month)
	{
	case 1: days=days+31;break;
	case 2: days=days+28;break;
	case 3: days=days+31;break;
	case 4: days=days+30;break;
	case 5: days=days+31;break;
	case 6: days=days+30;break;
	case 7: days=days+31;break;
	case 8: days=days+31;break;
	case 9: days=days+30;break;	
	case 10: days=days+31;break;
	case 11: days=days+30;break;
	case 12: days=days+31;break;
	}
	}
	days=days-d1;
    if(((y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0))&&m2>2) days=days+1;
	for(month=1;month<m2;month++)
	{
    switch(month)
	{
	case 1: days=days+31;break;
	case 2: days=days+28;break;
	case 3: days=days+31;break;
	case 4: days=days+30;break;
	case 5: days=days+31;break;
	case 6: days=days+30;break;
	case 7: days=days+31;break;
	case 8: days=days+31;break;
	case 9: days=days+30;break;	
	case 10: days=days+31;break;
	case 11: days=days+30;break;
	case 12: days=days+31;break;
	}
	}
    days=days+d2;
	if(y1==y2)
	{
		if((y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0)) days=days-366;
		else days=days-365;
	}
    printf("%d\n",days);
}
int main(){
	int y1,y2,m1,m2,d1,d2;
	cin>>y1>>m1>>d1>>y2>>m2>>d2;
	int mon[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	int sum=0;
	sum+=d2-d1;
	if(m2>=m1){
		for(int i=0;i<12;i++)
			if((i+1>=m1)&&(i+1<m2))sum+=mon[i];
	}
	else {
		for(int i=0;i<12;i++)
			if(i+1>=m2&&i+1<m1)sum-=mon[i];
	}
	sum+=(y2-y1)*365;
	for(int i=y1;i<=y2;i++)
		if((i%4==0&&i%100!=0)||(i%400==0))sum++;
	if(((y1%4==0&&y1%100!=0)||(y1%400==0))&&m1>2)sum--;
	if(((y2%4==0&&y2%100!=0)||(y2%400==0))&&m2<=2)sum--;
	cout<<sum<<endl;
	return 0;
}
int main()
{
	int startyear,startmonth,startday,endyear,endmonth,endday;
	int m[13],y[3001];
	int i,j,k,p;
	scanf("%d%d%d",&startyear,&startmonth,&startday);
	scanf("%d%d%d",&endyear,&endmonth,&endday);
	for(i=1;i<=12;i++)
	{
		if(i==1||i==3||i==5||i==7||1==8||i==10||i==12)
			m[i]=31;
		else if(i!=2)
			m[i]=30;
		else if(i==2&&(((endyear%4==0&&endyear%100!=0)||(endyear%400==0))||((startyear%4==0&&startyear%100!=0)||(startyear%400==0))))
			m[i]=29;
		else
			m[i]=28;
	}
	for(i=1;i<=3000;i++)
	{
		if((i % 4 == 0 && i % 100 != 0)||(i % 400 == 0))
			y[i]=366;
		else
			y[i]=365;
	}
	if(endyear==startyear)
	{
		if(endmonth!=startmonth)
		{
			for(i=startmonth+1,k=m[startmonth]-startday+endday+1;i<=endmonth-1;i++)
				k=k+m[i];
		}
		else
			k=endday-startday;
	}
	else if((startmonth<=2)&&((endmonth>2)||(endmonth==2&&endday==29)))
	{
		for(i=startmonth+1,k=m[startmonth]-startday+endday+1;i<=12;i++)
		{k=k+m[i];}
		for(j=endmonth-1;j>=1;j--)
		{k=k+m[j];}
		for(i=startyear+1;i<=endyear-1;i++)
		{
			k=k+y[i];
		}
	}
	else if(startyear!=endyear&&startmonth==endmonth&&startday==endday)
	{
		for(i=startyear,k=0;i<endyear;i++)
			k=k+y[i];
	}
	else
	{
		for(i=startmonth+1,k=m[startmonth]-startday+endday;i<=12;i++)
		{	k=k+m[i];}
		for(j=endmonth-1;j>=1;j--)
		{k=k+m[j];}
		for(i=startyear+1;i<=endyear-1;i++)
		{
			k=k+y[i];
		}
	}
	printf("%d",k);
	return 0;
}
const int day1[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
const int day2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int main()
{
	int i, y1, y2, m1, m2, d1, d2, ans=0;
	cin >> y1 >> m1 >> d1;
	cin >> y2 >> m2 >> d2;
	for (i=y1; i<=y2-1; i++)
		if (((i%4==0)&&(i%100!=0))||(i%400==0))
			ans=ans+366;
		else
			ans=ans+365;
	for (i=1; i<m1; i++)
		if (((y1%4==0)&&(y1%100!=0))||(y1%400==0))
			ans=ans-day2[i];
		else
			ans=ans-day1[i];
	ans=ans-d1;
	for (i=1; i<m2; i++)
		if (((y2%4==0)&&(y2%100!=0))||(y2%400==0))
			ans=ans+day2[i];
		else
			ans=ans+day1[i];
	ans=ans+d2;
	cout << ans << endl;
	return 0;
}
void main()
{
     int y1,m1,d1,y2,m2,d2;
	 int m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	 int i,j,l1=0,l2=0;
	 scanf("%d%d%d%d%d%d",&y1,&m1,&d1,&y2,&m2,&d2);

	 for(i=1;i<m1;i++)
	     l1+=m[i];
	 l1+=d1;
	 if((y1%4==0&&y1%100!=0)||(y1%400==0))
	 {
		 if(m1>2)
		 l1+=1;
	 } 

     for(i=1;i<m2;i++)
	     l2+=m[i];
     l2+=d2;
	 if((y2%4==0&&y2%100!=0)||(y2%400==0))
	 {
		 if(m2>2)
		 l2+=1;
	 }

	 if(y1!=y2)
	 {
         for(j=y1;j<y2;j++)
		 {
			 l2+=365;
			 if((j%4==0&&j%100!=0)||(j%400==0))
				 l2+=1;
		 }
	 }

	 printf("%d",l2-l1);

         
}
int run(int a)
{
	int c;
	if(a%400==0||(a%4==0&&a%100!=0))
		c=1;
	else
		c=0;
	return c;
}
int dijitian(int y,int m,int d)
{
    int c,p=0,i;
	c=run(y);
    for(i=1;i<m;i++)
	{
		if(i==4||i==6||i==9||i==11)
		 p=p+30;
		else if(i==2&&c==1)
	      p=p+29;
		else if(i==2&&c==0)
			p=p+28;
		else
			p=p+31;

	 }
	p=p+d;
	return p;
}
void main()
{
	int y1,m1,d1,y2,m2,d2;
	int a,b,c=0,result,temp,i;
	scanf("%d%d%d%d%d%d",&y1,&m1,&d1,&y2,&m2,&d2);
	a=dijitian(y1,m1,d1);
	b=dijitian(y2,m2,d2);
	if(y1==y2)
	{
        result=a-b;
		if(result<0)
			result=0-result;
	}
	else
	{
        if(y1>y2)
		{
            temp=y1;
			y1=y2;
			y2=temp;
			temp=m1;
			m1=m2;
			m2=temp;
			temp=d1;
			d1=d2;
			d2=temp;
		}
		if(run(y1)==1)
			a=366-a;
		else
			a=365-a;
		for(i=y1+1;i<y2;i++)
		{
			if(run(i)==1) c=c+366;
			else c=c+365;
		}
		result=a+b+c;
	}
	printf("%d",result);
}
int leap(int year);
int days(int year,int month,int day);
void main(){
	int y1,m1,d1,y2,m2,d2;
	int total=0,i;
	scanf("%d%d%d",&y1,&m1,&d1);
	scanf("%d%d%d",&y2,&m2,&d2);
	if(y1==y2)
		total=days(y2,m2,d2)-days(y1,m1,d1);
	else{
		
		if(leap(y1))
			total=366-days(y1,m1,d1);
		else{
			total=365-days(y1,m1,d1);
		}
		for(i=y1+1;i<y2;i++){
			if(leap(i))
				total+=366;
			else{
				total+=365;
			}
		}
		total+=days(y2,m2,d2);
	}
	printf("%d\n",total);
}


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

int days(int year,int month,int day){
	int i,days=0;      //???
	for(i=1;i<month;i++){
		if(i==1 || i==3 || i==5 || i==7 || i==8 || i==10 || i==12)
			days+=31;
		if(i==4 || i==6 || i==9 || i==11)
			days+=30;
		if(i==2){
			if(leap(year))
				days+=29;
			else{
				days+=28;
			}
		}
	}
	days+=day;
	return days;
}
int main()
{
	int a,b,c,d,e,f,days,i;
	days=0;
	scanf("%d%d%d\n",&a,&b,&c);
	scanf("%d%d%d",&d,&e,&f);
	for(i=a;i<d;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
			days=days+366;
		else
			days=days+365;
	}
	if(b<e)
	{
		for(i=b;i<e;i++)
		{
			if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
				days=days+31;
			else if(i==4||i==6||i==9||i==11)
				days=days+30;
			else if((d%4==0&&d%100!=0)||(d%400==0))
				days=days+29;
			else 
				days=days+28;
		}
	}
	if(b>e)
	{
		for(i=e;i<b;i++)
		{
			if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
				days=days-31;
			else if(i==4||i==6||i==9||i==11)
				days=days-30;
			else if((d%4==0&&d%100!=0)||(d%400==0))
				days=days-29;
			else 
				days=days-28;
		}
	}
	days=days+f-c;
	printf("%d",days);
	return 0;
}
int main()
{
	int y1,m1,d1,y2,m2,d2,sum1=0,sum2=0,x,k; 
	scanf("%d %d %d\n%d %d %d",&y1,&m1,&d1,&y2,&m2,&d2);
	sum1=sum1+d1;
	sum2=sum2+d2;
	for(k=1;k<m1;k++)
	{
		if(k==1||k==3||k==5||k==7||k==8||k==10||k==12)
		{
			sum1=sum1+31;
		}
		else if(k==4||k==6||k==9||k==11)
		{
			sum1=sum1+30;
		}
		else if(k==2)
		{
			if((y1%4==0&&y1%100!=0)||(y1%400==0))
			{
				sum1=sum1+29;
			}
			else
			{
				sum1=sum1+28;
			}
		}
	}
    for(k=1;k<m2;k++)
	{
		if(k==1||k==3||k==5||k==7||k==8||k==10||k==12)
		{
			sum2=sum2+31;
		}
		else if(k==4||k==6||k==9||k==11)
		{
			sum2=sum2+30;
		}
		else if(k==2)
		{
			if((y2%4==0&&y2%100!=0)||(y2%400==0))
			{
				sum2=sum2+29;
			}
			else
			{
				sum2=sum2+28;
			}
		}
	}
    for(k=y1;k<y2;k++)
	{
		if((k%4==0&&k%100!=0)||(k%400==0))
		{
			sum2=sum2+366;
		}
		else
		{
			sum2=sum2+365;
		}
	}
    x=sum2-sum1;
	printf("%d\n",x);
	return 0;
}
int runnian(int y){
	int result;
	if(y%4==0&&y%100!=0||y%400==0){
		result=1;
	}
	else 
		result=0;
	return result;
}
int dijitian(int year,int month,int day){
	int i,days=0,a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	a[2]=28+runnian(year);
	for(i=1;i<month;i++){
		days=days+a[i];
	}
	days=days+day;
	return days;
}
int main(int argc, char* argv[])
{
	int runnian(int y);
	int dijitian(int year,int month,int day);
	int i,sum=0,final,y1,m1,d1,y2,m2,d2;
	scanf("%d %d %d %d %d %d",&y1,&m1,&d1,&y2,&m2,&d2);
	
	for(i=y1;i<y2;i++){
		sum=sum+365+runnian(i);
	}
	final=sum+dijitian(y2,m2,d2)-dijitian(y1,m1,d1);
	printf("%d",final);
	return 0;
}
//?? - ??(10-2) ???????????
int main(void)
{
    int om[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
    int nom[12] = {31,29,31,30,31,30,31,31,30,31,30,31};
    int sy, sm, sd, s=0;
    int ey, em, ed, e=0;
    int d, i;
    scanf("%d %d %d", &sy, &sm, &sd);

    if((sy%4==0&&sy%100!=0)||(sy%400==0))
    {
        for(i=0; i<sm-1; i++)
            s+=nom[i];
        s+=sd;
    }
    else
    {
        for(i=0; i<sm-1; i++)
            s+=om[i];
        s+=sd;
    }
   // printf("%d\n", s);
    
    scanf("%d %d %d", &ey, &em, &ed);
    if((ey%4==0&&ey%100!=0)||(ey%400==0))
    {
        for(i=0; i<em-1; i++)
            e+=nom[i];
        e+=ed;
    }
    else
    {
        for(i=0; i<em-1; i++)
            e+=om[i];
        e+=ed;
    }


    for(i=sy;i<ey;i++)
    {
         if((i%4==0&&i%100!=0)||(i%400==0))
         e+=366;
         else
         e+=365;
    }
    printf("%d", e-s);
    return 0;
}
int main()
{
	int a,b,c,d,e,f,n,i,k;
	scanf("%d%d%d",&a,&b,&c);
	scanf("%d%d%d",&d,&e,&f);
	n=0;
	k=0;
	for (i=a;i<=d-1;i++)
	{
		if ((i%4==0 && i%100!=0)||(i%400==0))
		{
			k=k+1;
		}
	}
	n=(d-a)*365+k;
	if  ((d%4==0 && d%100!=0)||(d%400==0))
	{
		switch (e)
		{
		case 1: n=n;break;
		case 2: n=n+31;break;
		case 3: n=n+31+29;break;
		case 4: n=n+31+29+31;break;
		case 5: n=n+31+29+31+30;break;
		case 6: n=n+31+29+31+30+31;break;
		case 7: n=n+31+29+31+30+31+30;break;
		case 8: n=n+31+29+31+30+31+30+31;break;
		case 9: n=n+31+29+31+30+31+30+31+31;break;
		case 10:n=n+31+29+31+30+31+30+31+31+30;break;
		case 11:n=n+31+29+31+30+31+30+31+31+30+31;break;
		case 12:n=n+31+29+31+30+31+30+31+31+30+31+30;break;
		}
	}
	else
	{
	switch (e)
		{
		case 1: n=n;break;
		case 2: n=n+31;break;
		case 3: n=n+31+28;break;
		case 4: n=n+31+28+31;break;
		case 5: n=n+31+28+31+30;break;
		case 6: n=n+31+28+31+30+31;break;
		case 7: n=n+31+28+31+30+31+30;break;
		case 8: n=n+31+28+31+30+31+30+31;break;
		case 9: n=n+31+28+31+30+31+30+31+31;break;
		case 10:n=n+31+28+31+30+31+30+31+31+30;break;
		case 11:n=n+31+28+31+30+31+30+31+31+30+31;break;
		case 12:n=n+31+28+31+30+31+30+31+31+30+31+30;break;
		}	
	}
	
	if  ((a%4==0 && a%100!=0)||(a%400==0))
	{
		switch (b)
		{
		case 1: n=n;break;
		case 2: n=n-31;break;
		case 3: n=n-31-29;break;
		case 4: n=n-31-29-31;break;
		case 5: n=n-31-29-31-30;break;
		case 6: n=n-31-29-31-30-31;break;
		case 7: n=n-31-29-31-30-31-30;break;
		case 8: n=n-31-29-31-30-31-30-31;break;
		case 9: n=n-31-29-31-30-31-30-31-31;break;
		case 10:n=n-31-29-31-30-31-30-31-31-30;break;
		case 11:n=n-31-29-31-30-31-30-31-31-30-31;break;
		case 12:n=n-31-29-31-30-31-30-31-31-30-31-30;break;
		}
	}
	else
	{
	switch (b)
		{
		case 1: n=n;break;
		case 2: n=n-31;break;
		case 3: n=n-31-28;break;
		case 4: n=n-31-28-31;break;
		case 5: n=n-31-28-31-30;break;
		case 6: n=n-31-28-31-30-31;break;
		case 7: n=n-31-28-31-30-31-30;break;
		case 8: n=n-31-28-31-30-31-30-31;break;
		case 9: n=n-31-28-31-30-31-30-31-31;break;
		case 10:n=n-31-28-31-30-31-30-31-31-30;break;
		case 11:n=n-31-28-31-30-31-30-31-31-30-31;break;
		case 12:n=n-31-28-31-30-31-30-31-31-30-31-30;break;
		}	
	}
	n=n-c+f;
	printf("%d",n);
	return 0;
}
int sy,sm,sd,ey,em,ed,i,pmonth[14]={0,31,28,31,30,31,30,31,31,30,31,30,31,0};
int rmonth[14]={0,31,29,31,30,31,30,31,31,30,31,30,31,0},day=0,sum[10],r=0;
void load()
{
	cin>>sy>>sm>>sd>>ey>>em>>ed;
}
int isrun(int year)
{
	if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		return 1;
	else
		return 0;
}
void cacul()
{
	if(ey>sy)
	{
	if(isrun(sy)==1)
	{
		for(i=sm+1;i<14;i++)
		{
			sum[1]=sum[1]+rmonth[i];
		}
		sum[2]=rmonth[sm]-sd+1;
	}
	if(isrun(sy)==0)
	{
		for(i=sm+1;i<14;i++)
		{
			sum[1]=sum[1]+pmonth[i];
		}
		sum[2]=pmonth[sm]-sd+1;
	}
	if(isrun(ey)==1)
	{
		for(i=0;i<em;i++)
		{
			sum[3]=sum[3]+rmonth[i];
		}
		sum[4]=ed;
	}
	if(isrun(ey)==0)
	{
		for(i=0;i<em;i++)
		{
			sum[3]=sum[3]+pmonth[i];
		}
		sum[4]=ed;
	}
	if((ey-sy)>1)
	{
		for(i=sy+1;i<ey;i++)
	    {
		     if(isrun(i)==1)
			    sum[5]=sum[5]+366;
		     if(isrun(i)==0)
			   sum[5]=sum[5]+365;
	     }
	}
	else
		sum[5]=0;
	for(i=1;i<=5;i++)
		r=r+sum[i];
	cout<<r-1;
	}
	else
	{
		if(sm==em)
			cout<<ed-sd;
		else
		{
			if(isrun(sy)==1)
			{
				for(i=sm;i<em;i++)
				{
					sum[6]=sum[6]+rmonth[i];
				}
				sum[6]=sum[6]-rmonth[sm]+1+ed;
			}
			if(isrun(sy)==0)
			{
				for(i=sm;i<em;i++)
				{
					sum[6]=sum[6]+pmonth[i];
				}
				sum[6]=sum[6]-rmonth[sm]+1+ed;
			}
			cout<<sum[6];
		}
	}
}

int main()
{
	load();
	cacul();
}
int main()
{
	int by,bm,bd,ey,em,ed;
	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 sum=0;
	int i,j;
	cin>>by>>bm>>bd>>ey>>em>>ed;
	for(i=by;i<ey;i++)
	{
		if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
			sum=sum+366;
		else
			sum=sum+365;
	}
	for(i=1;i<em;i++)
	{
		if((ey % 4 == 0 && ey % 100 != 0) || (ey % 400 == 0))
			sum=sum+mon2[i];
		else
			sum=sum+mon1[i];
	}
	sum=sum+ed;
	for(i=1;i<bm;i++)
	{
		if((by % 4 == 0 && by % 100 != 0) || (by % 400 == 0))
			sum=sum-mon2[i];
		else
			sum=sum-mon1[i];
	}
	sum=sum-bd;
	cout<<sum<<endl;
	return 0;

}
int main()
{
	int y1,y2,m1,m2,d1,d2,day1=0,day2=0,i,j;
	int m[13]={0,31,0,31,30,31,30,31,31,30,31,30,31};
	cin>>y1>>m1>>d1;
	cin>>y2>>m2>>d2;
    for(i=y1;i<y2;i++)
	{
		if((i%4==0&&i%100!= 0)||(i%400==0))
			day2=day2+366;
		else day2=day2+365;
	}
	if((y2%4==0&&y2%100!= 0)||(y2%400==0))
	{
		for(i=1;i<m2;i++)
		{
			if(i==2)
				day2=day2+29;
			else
				day2=day2+m[i];
		}
		day2=day2+d2;
	}
	else 
	{
		for(i=1;i<m2;i++)
		{
			if(i==2)
				day2=day2+28;
			else
				day2=day2+m[i];
		}
		day2=day2+d2;
	}
	if((y1%4==0&&y1%100!=0)||(y1%400==0))
	{
		for(i=1;i<m1;i++)
		{
			if(i==2)
				day1=day1+29;
			else day1=day1+m[i];
		}
		day1=day1+d1;
	}
	else 
	{
		for(i=1;i<m1;i++)
		{
			if(i==2)
				day1=day1+28;
			else day1=day1+m[i];
		}
		day1=day1+d1;
	}
	cout<<day2-day1<<endl;
		return 0;
}
int Days(int x, int y, int z);
void main()
{
	int a[3],b[3],n;
	scanf("%d%d%d",&a[0],&a[1],&a[2]);
	scanf("\n");
	scanf("%d%d%d",&b[0],&b[1],&b[2]);
	n=Days(b[0],b[1],b[2])-Days(a[0],a[1],a[2]);
	printf("%d\n",n);
}



int Days(int x, int y, int z)
{
	int m,i,month=0;
	int day[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	if((x%4==0&&x%100!=0)||(x%400==0))
		day[2]=29;
	for(i=1;i<y;i++)
		month=month+day[i];
	m=(x-1)*365+month+z;
	for(i=1;i<x;i++)
		if((i%4==0&&i%100!= 0)||(i%400==0))
			m++;
		else
			continue;
	return m;
}
int main()
{
	int sY,sM,sD,eY,eM,eD;
	int DiJiTian(int y,int m,int d);
    int isRunNian(int year);
	scanf("%d%d%d%d%d%d",&sY,&sM,&sD,&eY,&eM,&eD);
	int x,days=DiJiTian(eY,eM,eD)-DiJiTian(sY,sM,sD);
	for(x=sY;x<eY;x++)
	{
		if(isRunNian(x))
		{
			days=days+366;
		}
		else
			days=days+365;
	}
	printf("%d",days);
	return 0;
}
int DiJiTian(int y,int m,int d)
{
	int isRunNian(int year);
	int i,result=0;
	for(i=1;i<m;i++)
	{
		if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
			result+=31;
		else if(i==4||i==6||i==9||i==11)
			result+=30;
		else if(i==2)
		{
			if(isRunNian(y))
			{
				result+=29;
			}
			else
				result+=28;
		}
	}
	result+=d;
	return result;
}
int isRunNian(int year)
{
	int result1;
	if(year%400==0||(year%4==0)&&(year%100!=0))
	{
		result1=1;
	}
	else
		result1=0;
	return result1;
}
void main()
{
	int startYear,startMonth,startDay,endYear,endMonth,endDay,y,a,n,m,b,b2,x;
	scanf("%d%d%d%d%d%d",&startYear,&startMonth,&startDay,&endYear,&endMonth,&endDay);
    y=startYear;
	a=0;
	while(y<=endYear)
		{
		int f;
		   if((y%4==0&&y%100!=0)||(y%100==0&&y%400==0))
			   f=1;
			else f=0;
		   if(f==1)
			   a=a+1;
		 y=y+1;
	}
	if ((startYear%4==0&&startYear%100!=0)||(startYear%100==0&&startYear%400==0))
	a=a-1;
	if ((endYear%4==0&&endYear%100!=0)||(endYear%100==0&&endYear%400==0))
	a=a-1;
	n=a*366;
	if ((startYear%4==0&&startYear%100!=0)||(startYear%100==0&&startYear%400==0))
    {
	 if(startMonth==1)
		   b=0;
	   else if(startMonth==2)
		   b=31;
	   else if(startMonth==3)
		   b=60;
	   else if(startMonth==4)
		   b=91;
	   else if(startMonth==5)
	       b=121;
	   else if(startMonth==6)
		   b=152;
	   else if(startMonth==7)
		   b=182;
	   else if(startMonth==8)
		   b=213;
	   else if(startMonth==9)
		   b=244;
	   else if(startMonth==10)
	       b=274;
	   else if(startMonth==11)
		   b=305;
	   else 
		   b=335;  
	   }
	else
	{
	if(startMonth==1)
		   b=0;
	   else if(startMonth==2)
		   b=31;
	   else if(startMonth==3)
		   b=59;
	   else if(startMonth==4)
		   b=90;
	   else if(startMonth==5)
	       b=120;
	   else if(startMonth==6)
		   b=151;
	   else if(startMonth==7)
		   b=181;
	   else if(startMonth==8)
		   b=212;
	   else if(startMonth==9)
		   b=243;
	   else if(startMonth==10)
	       b=273;
	   else if(startMonth==11)
		   b=304;
	   else 
		   b=334;
	   b=b+1;
	}


	if ((endYear%4==0&&endYear%100!=0)||(endYear%100==0&&endYear%400==0))
	{
	   if(endMonth==1)
		   b2=0;
	   else if(endMonth==2)
		   b2=31;
	   else if(endMonth==3)
		   b2=60;
	   else if(endMonth==4)
		   b2=91;
	   else if(endMonth==5)
	       b2=121;
	   else if(endMonth==6)
		   b2=152;
	   else if(endMonth==7)
		   b2=182;
	   else if(endMonth==8)
		   b2=213;
	   else if(endMonth==9)
		   b2=244;
	   else if(endMonth==10)
	       b2=274;
	   else if(endMonth==11)
		   b2=305;
	   else 
		   b2=335;
	   }
	else
	{
	if(endMonth==1)
		   b2=0;
	   else if(endMonth==2)
		   b2=31;
	   else if(endMonth==3)
		   b2=59;
	   else if(endMonth==4)
		   b2=90;
	   else if(endMonth==5)
	       b2=120;
	   else if(endMonth==6)
		   b2=151;
	   else if(endMonth==7)
		   b2=181;
	   else if(endMonth==8)
		   b2=212;
	   else if(endMonth==9)
		   b2=243;
	   else if(endMonth==10)
	       b2=273;
	   else if(endMonth==11)
		   b2=304;
	   else 
		   b2=334;
	}

	x=366-b-startDay+b2+endDay+366*a+(endYear-startYear-1-a)*365;
    printf("%d",x);
}
void main()
{
	int a,b,c,d,e,f,m,n,i,j,k,p;
	scanf("%d %d %d",&a,&b,&c);
	scanf("%d %d %d",&d,&e,&f);
	m=0;
	n=0;
	for (i=1;i<b;i++)
	{
		if (i==1||i==3||i==5||i==7||i==8||i==10)
			n=n+31;
		else if (i==2)
		{
			if(a%400==0||(a%100!=0&&a%4==0))
				n=n+29;
			else n=n+28;}
		else n=n+30;}
	n=n+c;
	for (j=1;a+j<=d;j++)
	{
		if ((a+j-1)%400==0||((a+j-1)%100!=0&&(a+j-1)%4==0))
			m=m+366;
		else m=m+365;}
	for (k=1;k<e;k++)
	{
		if (k==1||k==3||k==5||k==7||k==8||k==10)
			m=m+31;
		else if (k==2)
		{
			if(d%400==0||(d%100!=0&&d%4==0))
				m=m+29;
			else m=m+28;}
		else m=m+30;}
    m=m+f;
	p=m-n;
	printf("%d",p);
}
int main()
{
	int year[2],month[2],day[2],days=0;   
	int flag=0,i,j;  //flag?????????
	cin>>year[0]>>month[0]>>day[0]>>year[1]>>month[1]>>day[1];
	int leap_year[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};   //?????????????
	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];i<12;i++)
		{
			if((year[0] % 4 == 0 && year[0] % 100 != 0) || (year[0] % 400 == 0))
			{
				days+=leap_year[1][i];
				flag=1;
			}
			else days+=leap_year[0][i];
		}   //?????????????
		for(i=0;i<month[1]-1;i++)
		{
			if((year[1] % 4 == 0 && year[1] % 100 != 0) || (year[1] % 400 == 0))
				days+=leap_year[1][i];
			else days+=leap_year[0][i];
		}  //??????????
		days=days+day[1]+leap_year[flag][month[0]-1]-day[0];  //????????????????
	}
	else if(month[0]!=month[1])  //???????????????????????????
	{
		for(i=month[0];i<month[1]-1;i++)
		{
			if((year[0] % 4 == 0 && year[0] % 100 != 0) || (year[0] % 400 == 0))
			{
				days+=leap_year[1][i];
				flag=1;
			}
			else days+=leap_year[0][i];  
		}
        days=days+day[1]+leap_year[flag][month[0]-1]-day[0];  //??????????????????
	}
	else days=days+day[1]-day[0];   //??????????????????????????
	cout<<days<<endl;
	return 0;
}
int main()
{
	int month[2][13] = {0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 0, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335};
    int date1, date2, leap1, leap2;
	int year1, year2, m1, m2, d1, d2, i;
	cin >> year1 >> m1 >> d1;
	cin >> year2 >> m2 >> d2;
	leap1 = (year1 % 4 == 0&&year1 % 100 != 0)||(year1 % 400 == 0);
	leap2 = (year2 % 4 == 0&&year2 % 100 != 0)||(year2 % 400 == 0);
	date1 = month[leap1][m1] + d1;
	date2 = month[leap2][m2] + d2;
	for(i = year1; i < year2; i++)
	{
		leap2 = (i % 4 == 0&&i % 100 != 0)||i % 400 == 0;
		date2 = 365 + leap2 + date2;
	}
	cout << date2 - date1;
	return 0;
}
void main()
{
	int year(int x);
	int diy(int x,int y,int z);
	int a,b,c,d,e,f,y1,y2,an;
scanf("%d %d %d",&a,&b,&c);
scanf("%d %d %d",&d,&e,&f);
y1=year(a)+diy(a,b,c);
y2=year(d)+diy(d,e,f);
an=y2-y1;
printf("%d\n",an);
}
int year(int x)
{
	int ay,by;
	ay=(x-1)/4-(x-1)/100+(x-1)/400;
	by=365*(x-1)+ay;
	return(by);
}
int diy(int x,int y,int z)
{
	int day=0,c,i,a[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	if((x%4==0&&x%100!=0)||(x%400==0))c=1;else c=0;
	a[1]=a[1]+c;
	if(y==1)day=z;
	else
	{
		for(i=0;i<y-1;i++)
		{
			day=day+a[i];
		}
		day=day+z;
	}
	return(day);
}
int judge(int x){
	if(x%400==0||(x%4==0&&x%100!=0))
		return 1;
	return 0;
}
int main(){
	int y1,m1,d1,y2,m2,d2;
	cin>>y1>>m1>>d1;
	cin>>y2>>m2>>d2;
	int sum=0,n=0;
	int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	for(int i=y1+1;i<y2;i++){
		if(judge(i))n++;
	}
	if(y1==y2&&m1==m2&&d1==d2)sum=0;
	else if(y1==y2&&m1==m2)sum=d2-d1;
	else if(y1==y2){
		for(int i=m1+1;i<m2;i++)
			sum=sum+a[i];
		sum=sum+a[m1]-d1+d2;
		if(judge(y1)&&(m1<=2)&&(m2>2))sum++;
	}
	else if(y1!=y2){
		for(int i=m1+1;i<=12;i++)
			sum=sum+a[i];
		for(int i=1;i<m2;i++)
			sum=sum+a[i];
		sum=sum+a[m1]-d1+d2;
		if(judge(y1)&&m1<=2)sum++;
		if(judge(y2)&&m2>2)sum++;
		sum=sum+365*(y2-y1-1)+n;
	}
	cout<<sum<<endl;
	return 0;
}