semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
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 starty,startm,startd;
	int endy,endm,endd;
	int i,j,y=0,m1=0,m2=0,year,year1;
	int month1[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};//????
	int month2[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};//??

	cin>>starty>>startm>>startd;
	cin>>endy>>endm>>endd;
	for( year=starty;year<endy;year++)//??????????
	{
	if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		 year1=366;
	else year1=365;
	y=y+year1;
	}

	if((starty % 4 == 0 && starty % 100 != 0) || (starty % 400 == 0))
	{for(i=1;i<startm;i++)
	m1=m1+month2[i];
	}
	else {for(i=1;i<startm;i++)
m1=m1+month1[i];
		}
	if((endy % 4 == 0 && endy % 100 != 0) || (endy % 400 == 0))
		{for(i=1;i<endm;i++)
		m2=m2+month2[i];
		}
		else {
			for(i=1;i<endm;i++)
				m2=m2+month1[i];
			}
	int sum;
	sum=y+m2-m1+endd-startd;
	cout<<sum;


	}
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;
}
unsigned findday(unsigned y,unsigned m,unsigned d)
{
 int leap,day;
 if((y%4==0&&y%100!=0)||(y%400==0)) leap=1;
 else leap=0;
 day=d;
 switch(m-1)
 {
  case 11:day+=30;
  case 10:day+=31;
  case  9:day+=30;
  case  8:day+=31;
  case  7:day+=31;
  case  6:day+=30;
  case  5:day+=31;
  case  4:day+=30;
  case  3:day+=31;
  case  2:
  if(leap==1) day+=29;
  else day+=28;
  case  1:day+=31;  
 }
 return day;
}

int main()
{
    unsigned y1,m1,d1,y2,m2,d2,i,p0,p1,c=0,p2,s; 
    scanf("%u %u %u",&y1,&m1,&d1);
    scanf("%u %u %u",&y2,&m2,&d2);
    if(y1==y2) s=findday(y2,m2,d2)-findday(y1,m1,d1);
    else
    {
    if(y1%4==0)
    p0=366-findday(y1,m1,d1);
    else
    p0=365-findday(y1,m1,d1); 

    
    for(i=y1+1;i<y2;i++)
    if((i%4==0&&i%100!=0)||(i%400==0))
    c+=1;
    p1=(y2-y1-1)*365+c;


    p2=findday(y2,m2,d2);
    s=p0+p1+p2;
    }    
    printf("%u",s); 
}
int main()
{
	int sy,sm,sd,ey,em,ed,day=0;
	cin>>sy>>sm>>sd>>ey>>em>>ed;
	while(sy!=ey||sm!=em||sd!=ed)
	{
		day++;
		if((sd==31&&(sm==1||sm==3||sm==5||sm==7||sm==8||sm==10))||(sd==30&&(sm==4||sm==6||sm==9||sm==11)))
		{
			//cout<<sy<<" "<<sm<<" "<<sd<<endl;
			sd=1;
			sm+=1;
		}
		else if(sd==29&&sm==2&&((sy%4==0&&sy%100!=0)||sy%400==0))
		{
			//cout<<sy<<" "<<sm<<" "<<sd<<endl;
			sd=1;
			sm+=1;
		}
		else if(sd==28&&sm==2&&(!((sy%4==0&&sy%100!=0)||sy%400==0)))
		{
			//cout<<sy<<" "<<sm<<" "<<sd<<endl;
			sd=1;
			sm+=1;
		}
		else if(sd==31&&sm==12)
		{
			//cout<<sy<<" "<<sm<<" "<<sd<<endl;
			sy+=1;
			sm=1;
			sd=1;
		}
		else
		{
			sd+=1;
		}
	}
	cout<<day<<endl;
	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 runnian(int year)
{
	if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		return 1;
	else
		return 0;
}

int dijitian(int y,int m,int d)
{
	int i,day=0;
	if(runnian(y))
	{
		if(m==2)
			return (31+d);
		else if(m==1)
			return (d);
		else
		{
			for(i=1;i<m;i++)
			{
				if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
					day+=31;
				else if(i==2)
					day+=29;
				else
					day+=30;
			}
			return (day+d);
		}
	}
	else
	{
		if(m==2)
			return (31+d);
		else if(m==1)
			return (d);
		else
		{
			for(i=1;i<m;i++)
			{
				if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
					day+=31;
				else if(i==2)
					day+=28;
				else
					day+=30;
			}
			return (day+d);
		}
	}
}


int main()
{
	int y1,y2,m1,m2,d1,d2,i,j,k,l,m,n,day=0;
	scanf("%d%d%d",&y1,&m1,&d1);
	scanf("%d%d%d",&y2,&m2,&d2);
	k=dijitian(y1,m1,d1);
	l=dijitian(y2,m2,d2);
	if(y1!=y2)
	{
		for(i=y1;i<y2;i++)
	{
		if(runnian(i))
			day+=366;
		else
			day+=365;
	}
	}
	printf("%d",day+l-k);
	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 main()
{
    int y1, y2, m1, m2, d1, d2, n1=0, n2, n3, num;
    int ly=0, i, a=0, b=0;

    scanf("%d %d %d\n%d %d %d", &y1, &m1, &d1, &y2, &m2, &d2);
    if(y2-y1>0)
    {
        for(i=y1;i<y2;i++)
        {
            if( (i%4==0 && i%100!=0) || (i%400==0) )
                ly++;
            n1=(y2-y1)*365+ly;
        }
    }

    
    if(m1>1)
    {
        for(i=1;i<m1;i++)
        {
            if(i==2)
            {
                if( (y1%4==0 && y1%100!=0) || (y1%400==0) )
                {
                    a+=29;
                }else{
                    a+=28;
                }
            }else if( i==4 || i==6 || i==9 || i==11 ){
                a+=30;
            }else{
                a+=31;
            }
        }
    }
    // a?m1????
    if(m2>1)
    {
        for(i=1;i<m2;i++)
        {
            if(i==2)
            {
                if( (y2%4==0 && y2%100!=0) || (y2%400==0) )
                {
                    b+=29;
                }else{
                    b+=28;
                }
            }else if( i==4 || i==6 || i==9 || i==11 ){
                b+=30;
            }else{
                b+=31;
            }
        }
    }

    n2=b-a;
 
    n3=d2-d1;
    
    num=n1+n2+n3;
    
    printf("%d\n", num);

    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);
}
/*
 * 3.cpp
 *
 *  Created on: 2011-1-9
 *      Author: jsgl
 */
int main(){
	int sy,sm,sd,ey,em,ed,day1=0,day2=0;
	cin>>sy>>sm>>sd>>ey>>em>>ed;
	int nory[11]={31,28,31,30,31,30,31,31,30,31,30};
	int aby[11]={31,29,31,30,31,30,31,31,30,31,30};
	int year,i;
	for(year=0;year<sy;year++){
		if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)){
			day1=day1+366;
		}
		else day1=day1+365;
	}
		year=sy;
		if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)){
			for(i=0;i<sm-1;i++){
				day1=day1+aby[i];
			}
		}
			else {for(i=0;i<sm-1;i++)
				day1=day1+nory[i];
			}
		day1=day1+sd;

		for(year=0;year<ey;year++){
				if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)){
					day2=day2+366;
				}
				else day2=day2+365;
			}
				year=ey;
				if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)){
					for(i=0;i<em-1;i++){
						day2=day2+aby[i];
					}
				}
					else {for(i=0;i<em-1;i++)
						day2=day2+nory[i];
					}
				day2=day2+ed;
		cout<<day2-day1<<endl;
		return 0;

}
int ir(int n);
int djt(int y,int m,int d);
int ir(int n){
	if((n%4==0&&n%100!=0)||(n%400==0)){
	  return 1;
	}
return 0;
}
int djt(int y,int m,int d){
     int days[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int i,s=0;
	for(i=1;i<m;i++){
		if(i==2&&ir(y)){
			s+=29;
		}else {
		    s+=days[i];
		}
	
	}
    s+=d;
	return s;
}

int main(){
	int s1=0,s2=0,s=0,i;
	int days[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	struct ymd{
		int y,m,d;
	} n1,n2,t;
	scanf("%d%d%d%d%d%d",&n1.y,&n1.m,&n1.d,&n2.y,&n2.m,&n2.d);
	if((n1.y>n2.y)||(n1.y==n2.y&&n1.m>n2.m)||(n1.y==n2.y&&n1.m==n2.m&&n1.d>n2.d)){
	    t=n1;
		n1=n2;
		n2=t;
	}
    s1=djt(n1.y,n1.m,n1.d);
    s2=djt(n2.y,n2.m,n2.d);
	if(n1.y==n2.y){
	  s=s2-s1;
	
	}else {
		if(ir(n1.y)){
		   s1=366-s1;
		}else {
		   s1=365-s1;
		}
		for(i=n1.y+1;i<n2.y;i++){
			if(ir(i)){
			  s+=366;
			
			}else {
			  s+=365;
			}
		
		}
		s+=s1+s2;
	}
	printf("%d",s);

   return 0;
}
int main ( )
{
	int i,j,k;
	int a[2],b[12],d[2];
	int sd0,sd,ed0,ed;
	cin >> d[0] >>a[0]>> sd ;
	cin >> d[1] >>a[1] >> ed ;
	int ld;
			
	if(d[0]==d[1])
	{
		if((d[0]&400==0)||(d[0]%4==0&&d[0]%100!=0))
				ld=29;
			else
				ld=28;
		if(a[0]==a[1])
		{
			cout << ed-sd << endl;
		}
		else
		{
			int s=0;
			for(j=a[0];j<=a[1]-1;j++)
			{
				switch(j)
				{
				case 1:
				case 3:
			    case 5:
			    case 7:
			    case 8:
			    case 10:
			    case 12:b[j]=31;break;
			    case 2:b[j]=ld;break;
			    case 4:
			    case 6:
			    case 9:
				case 11:b[j]=30;break;
				}
				s+=b[j];
			}
			cout<< s-sd+ed << endl;
		}
	}


	else
	{   
		int z=0,D=0;
		int c[2]={0};
		for(i=d[0];i<=d[1]-1;i++)
		{
			if((i%400==0)||(i%4==0&&i%100!=0))
			{
				z++;
			}
		}
		for(k=0;k<=1;k++)
		{
			for(int x=0;x<=a[k]-1;x++)
			{
				if((d[k]&400==0)||(d[k]%4==0&&d[k]%100!=0))
				ld=29;
			else
				ld=28;
				switch(x)
				{
				case 0:b[x]=0;break;
				case 1:
				case 3:
			    case 5:
			    case 7:
			    case 8:
			    case 10:
			    case 12:b[x]=31;break;
			    case 2:b[x]=ld;break;
			    case 4:
			    case 6:
			    case 9:
				case 11:b[x]=30;break;
				}
				c[k]+=b[x];
			}
		}

		D=(d[1]-d[0]-z)*365+z*366-c[0]-sd+c[1]+ed;
		cout << D << endl ;
	}

	return 0;
}
int mon1[12]={31,28,31,30,31,30,31,31,30,31,30,31};
int mon2[12]={31,29,31,30,31,30,31,31,30,31,30,31};

int cal(int y,int m,int d)
{
	int num=0,i;
	while(y>400)
	{
		y-=400;
		num+=146097;
	}
	if(y==400)
	{
		num+=145731;
		for(i=0;i<m-1;i++)
			num+=mon2[i];
		num+=d;
	}
	else
	{
		while(y>100)
		{
			y-=100;
			num+=36524;
		}
		if(y==100)
		{
			num+=36159;
			for(i=0;i<m-1;i++)
				num+=mon1[i];
			num+=d;
		}
		else
		{
			while(y>4)
			{
				y-=4;
				num+=1461;
			}
			if(y==4)
			{
				num+=365*3;
				for(i=0;i<m-1;i++)
					num+=mon2[i];
				num+=d;
			}
			else
			{
				num+=365*(y-1);
				for(i=0;i<m-1;i++)
					num+=mon1[i];
				num+=d;
			}
		}
	}
	return num;
}





int main()
{
	int y1,y2,m1,m2,d1,d2;
	cin>>y1>>m1>>d1>>y2>>m2>>d2;
	cout<<cal(y2,m2,d2)-cal(y1,m1,d1)<<endl;
	return 0;
}
int main()
{
    int oy,om,od,ty,tm,td;
    cin>>oy>>om>>od>>ty>>tm>>td;
    int run[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
    int ping[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
    int zong=0;
    int year,mon,day;
    if(oy==ty)
    {
              if(om!=tm)
              {
                                                   for(mon=om+1;mon<tm;mon++)
                                                   {
                                                                             if((oy%4==0&&oy%100!=0)||(oy%400==0))
                                                                             zong=zong+run[mon-1];
                                                                             else zong=zong+ping[mon-1];
                                                   }
                                                   if((oy%4==0&&oy%100!=0)||(oy%400==0))
                                                   zong=zong+run[om-1]-od+td;
                                                   else zong=zong+ping[om-1]-od+td;
              }
              else if(om==tm)
              zong=td-od;
    }
    else 
    {                                                                               
    for(year=oy+1;year<ty;year++)
    {
                        if((year%4==0&&year%100!=0)||(year%400==0))
                        zong=zong+366;
                        else zong=zong+365;
    }
    if((oy%4==0&&oy%100!=0)||(oy%400==0))
    {
                                         for(mon=om+1;mon<=12;mon++)
                                         {
                                                                   zong=zong+run[mon];
                                         }
                                         zong=zong+run[om]-od+1;
    }
    else 
    {
         for(mon=om+1;mon<=12;mon++)
         {
                                  zong=zong+ping[mon];
         }
         zong=zong+ping[om]-od+1;
    }
    if((ty%4==0&&ty%100!=0)||(ty%400==0))
    {
                                         for(mon=1;mon<tm;mon++)
                                         {
                                                                   zong=zong+run[mon];
                                         }
                                         zong=zong+td-1;
    }
    else 
    {
         for(mon=1;mon<tm;mon++)
         {
                                  zong=zong+ping[mon];
         }
         zong=zong+td-1;
    }
    }
    cout<<zong;
    return 0;
}