semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	long year1,month1,day1,year2,month2,day2,len1=0,len2=0;
	scanf("%d %d %d %d %d %d",&year1,&month1
	,&day1,&year2,&month2,&day2);
	long year,i,c;
	int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	for(year=0;year<year1;year++)
	{
		if(year%4==0&&year%100!=0||(year%400==0))
		len1+=366;
		else len1+=365;
     }
     for(year=0;year<year2;year++)
	{
		if(year%4==0&&year%100!=0||(year%400==0))
		len2+=366;
		else len2+=365;
    }
    for(i=0;i<month1;i++) len1+=month[i];
    for(i=0;i<month2;i++) len2+=month[i];
    if((year1%4==0&&year1%100!=0||(year1%400==0))&&(month1>2))
     len1+=1;
	 if((year2%4==0&&year2%100!=0||(year2%400==0))&&(month2>2))                                                         
    len2+=1;
    len1+=day1;
    len2+=day2;
    c=len2-len1;
    printf("%d",c);
    
 }
int main()
{
	int sy,sm,sd,ey,em,ed;
	int date=0;
	cin>>sy>>sm>>sd>>ey>>em>>ed;
	while (sy!=ey || sm!=em || sd!=ed)
	{
		date++;
		if (sm==12 && sd==31)
		{
			sy++;
			sm=1;
			sd=1;
		}
		else if (
			((sm==1 || sm==3 || sm==5 || sm==7 || sm==8 || sm==10) && sd==31)
			||((sm==4 || sm==6 || sm==9 || sm==11) && sd==30))
		{
			sm++;
			sd=1;
		}
		else if (sm==2 && ((sy%4==0 && sy%100!=0) || (sy%400==0)) && sd==29)
		{
			sm++;
			sd=1;
		}
		else if (sm==2 && ((sy%4!=0) || (sy%100==0 && sy%400!=0)) && sd==28)
		{
			sm++;
			sd=1;
		}
		else sd++;
	}
	cout<<date<<endl;
	return 0;
}
int main()
{
	signed int i,b[2]={365,366},a[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}},sy,sm,sd,ey,em,ed,dc,j,k;
	cin>>sy>>sm>>sd>>ey>>em>>ed;
	dc=0;
	if(ey==sy)
	{
		if((sy%4==0&&sy%100!=0)||sy%400==0)
		{
			if(sm==em)
			{
				dc=ed-sd;
			}
			else
			{
				for(i=sm;i<=em-1;i++)
				{
					dc=dc+a[1][i];
				}
				dc=dc+ed-sd;
			}
		}
		else
		{
			if(sm==em)
			{
				dc=ed-sd;
			}
			else
			{
				for(i=sm;i<=em-1;i++)
				{
					dc=dc+a[0][i];
				}
				dc=dc+ed-sd;
			}
		}
	}
	else
	{
		for(i=sy;i<=ey-1;i++)
		{
			if(i%4==0&&i%100!=0||i%400==0)
			{
				dc=dc+b[1];
			}
			else
			{
				dc=dc+b[0];
			}
		}
		if((sy%4==0&&sy%100!=0)||sy%400==0)
		{
			if(sm==em)
			{
				dc=dc+ed-sd;
			}
			else if(sm>em)
			{
				k=0;
				for(i=em;i<=sm-1;i++)
				{
					k=k+a[1][i];
				}
				dc=dc-k+ed-sd;
			}
			else
			{
				for(i=sm;i<=em-1;i++)
				{
					dc=dc+a[1][i];
				}
				dc=dc+ed-sd;
			}
		}
		else
		{
			if(sm==em)
			{
				dc=dc+ed-sd;
			}
			else if(sm>em)
			{
				k=0;
				for(i=em;i<=sm-1;i++)
				{
					k=k+a[0][i];
				}
				dc=dc-k+ed-sd;
			}
			else
			{
				for(i=sm;i<=em-1;i++)
				{
					dc=dc+a[0][i];
				}
				dc=dc+ed-sd;
			}
		}
		if(em>2)
		{
			if((ey%4==0&&ey%100!=0)||ey%400==0)
			{
				dc=dc+1;
			}
		}
	}
	cout<<dc<<endl;
	return 0;
}
void main()
{
	int sty,stm,std,eny,enm,end;
	int i,j,k,a,b;a=0;
	scanf("%d %d %d",&sty,&stm,&std);
	scanf("%d %d %d",&eny,&enm,&end);
	int daysto1_1_(int n);
	std=std+daysto1_1_(stm);
	end=end+daysto1_1_(enm);
	if ((stm<=2&&sty%4==0&&sty%100!=0)||sty%400==0)
	{a++;}
	for(i=sty+1;i<eny;i++)
		{ if ((i%4==0&&i%100!=0)||i%400==0)
		{a++;}
		}
    if ((enm>=2&&eny%4==0&&eny%100!=0)||eny%400==0)
	{a++;}
	b=end-std+a+365*(eny-sty);
	printf("%d",b);
}
int daysto1_1_(int n)
{
	int y=0;
	switch(n)
	{ 
	case 12:y=y+30;
	case 11:y=y+31;
	case 10:y=y+30;
	case 9:y=y+31;
    case 8:y=y+31;
	case 7:y=y+30;
	case 6:y=y+31;
	case 5:y=y+30;
	case 4:y=y+31;
	case 3:y=y+28;
	case 2:y=y+31;
	default: break;
	}
    return(y);
}
int leap(int year)
{
	
	if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		return 1;
	else return 0;

}






int main()
{
	
	int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int syear=0, eyear=0, smonth=0, emonth=0, sday=0, eday=0;
	int nleap=0;
	int nyears=0;
	int startYearDays=0;
	int endYearDays=0;
	int totaldays=0;
	cin>>syear>>smonth>>sday;
	cin>>eyear>>emonth>>eday;

	for(int i=syear; i<=eyear; i++)
	{
		if(leap(i))
			nleap++;
	
	}

	nyears=(eyear-syear)-1;

	for(int i=smonth+1; i<=12; i++)
	{
		startYearDays=startYearDays+month[i];
		
	}


	startYearDays=startYearDays+(month[smonth]-sday);


	//	cout<<startYearDays;

	//	cout<<endl;
	
//===================================== days in start year correct================================





	for(int i=1; i<=emonth-1; i++)
	{
		endYearDays=endYearDays+month[i];
	

	}


	endYearDays=endYearDays+eday;


//	cout<< endYearDays<<endl;




	totaldays=(nyears)*365+endYearDays+startYearDays+nleap;

	cout<<totaldays;


return 0;

}
int main()
{
	int startyear,startmonth,startday,endyear,endmonth,endday,year,month;
	int a[13]={31,28,31,30,31,30,31,31,30,31,30,31};
    int day;
	int i=0;
	scanf("%d%d%d",&startyear,&startmonth,&startday);
	scanf("%d%d%d",&endyear,&endmonth,&endday);
	day=0;
	for(year=startyear;year<endyear;++year)
	{
		day=day+365;
	}
	if(startmonth<endmonth)
	{
		for(month=startmonth;month<endmonth;++month)
		{
			day=day+a[month-1];
		}
	}
	else if(startmonth>endmonth)
	{
		for(month=startmonth;month>endmonth;--month)
		{
			day=day-a[month];
		}
	}
	day=day+endday-startday;
	for(year=startyear;year<=endyear;++year)
	{
		if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) ++i;
	}
	if(((startyear % 4 == 0 && startyear % 100 != 0) || (startyear % 400 == 0))&&(startmonth>2))
		i=i-1;
	if(((endyear % 4 == 0 && endyear % 100 != 0) || (endyear % 400 == 0))&&(endmonth<2))
		i=i-1;
	day=day+i;
	printf("%d\n",day);
	return 0;
}
int main( )
{
    int p,b,c,h,q,w,e,a,s,d,m[12]={31,28,31,30,31,30,31,31,30,31,30,31};
    cin>>q>>w>>e;
    cin>>a>>s>>d;
    p=(a-q)*365;
    for(int i=0;i<w-1;i++)
    	p=p-m[i];
    for(int i=0;i<s-1;i++)
    	p=p+m[i];
    p=p+d-e;
	b=q*10000+w*100+e;
	c=a*10000+s*100+d;
    for(int i=q;i<a+1;i++)
    	{
    	h=i*10000+2*100+29;
    	if((i%4==0&&i%100!=0)||(i%400==0)&&(b<=h)&&(c>h))
    	p=p+1;
    	}
    if(w==2&&s==2&&e==29&&d==29)
    	p=p+1;
    cout<<p<<endl;
    return 0;
}
int main()
{
	int s[12]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int a,b,c,d,e,f;
	int i,sum1=0,sum2=0,m,j;
	scanf("%d%d%d\n",&a,&b,&c);
    scanf("%d%d%d",&d,&e,&f);
	if(a==d)
	{
		if((a%4==0&&a%100!=0)||(a%400==0))
		{s[2]=29;}
		for(i=0;i<b;i++)
		{
			sum1+=s[i];
		}
		sum1=sum1+c;
		for(i=0;i<e;i++)
		{
			sum2+=s[i];
		}
		sum2=sum2+f;
        m=sum2-sum1;
	}
	else
	{
        if((a%4==0&&a%100!=0)||(a%400==0))
		{s[2]=29;}
        for(i=0;i<b;i++)
		{
			sum1+=s[i];
		}
		sum1=sum1+c;
        if((d%4==0&&d%100!=0)||(d%400==0))
		{s[2]=29;}
        for(i=0;i<e;i++)
		{
			sum2+=s[i];
		}
		sum2=sum2+f;
		m=sum2-sum1;
		j=d-a;
		for(i=0;i<j;i++)
		{
			if(((a+i)%4==0&&(a+i)%100!=0)||((a+i)%400==0))
			{m+=366;}
			else
			{m+=365;}
		}
	}
	printf("%d",m);
	return 0;
}
int main()
{
    int y,m,d;
    int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
    cin>>y>>m>>d;

    int t=0;
    for (int year=1;year<=y-1;year++)
    {
        if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
            t+=366; else t+=365;
    }
    int year=y;
    if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) month[2]=29; else month[2]=28;
    for (int i=1;i<=m-1;i++)
    {
        t=t+month[i];
    }
    t+=d;
    int t2=t;

    cin>>y>>m>>d;

    t=0;
    for (int year=1;year<=y-1;year++)
    {
        if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
            t+=366; else t+=365;
    }
    year=y;
    if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) month[2]=29; else month[2]=28;
    for (int i=1;i<=m-1;i++)
    {
        t=t+month[i];
    }
    t+=d;

    cout<<abs(t-t2);
    return 0;
}
int month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};//??????
int startYear, startMonth, startDay, endYear, endMonth, endDay;
void main()
{

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

	int f(int), h1(int), h2(int), g(int, int);//f????????h????????g?????365??????????
	int i, sum=0, result;//sum?startYear?endYear??????(??????)

	if (startYear != endYear) 
	{
		for (i=startYear+1; i<endYear; i++) 
			if ( f(i)==1 )  sum = sum + 1;
		//printf("%d\n",sum); 
		//printf("%d\n",g(startMonth, startDay)); 
		//printf("%d\n",(f(startYear) && h1(startMonth))); 
		//printf("%d\n",g(endMonth, endDay)); 
		//printf("%d\n",(f(endYear) && h2(endMonth))); 
		result=365-g(startMonth, startDay)+(f(startYear) && h1(startMonth)) + 
		(endYear-startYear-1)*365 + sum + 
		g(endMonth, endDay)+(f(endYear) && h2(endMonth));
	}
	else {
		result=g(endMonth,endDay) - g(startMonth,startDay) + (f(startYear) && h1(startMonth) && h2(endMonth));
	};
	printf("%d", result);	
}
int f(int year)//????
{
	return( (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0) ) ;//1????0????
}
int h1(int mon)//????1
{
	return(mon<=2);
}
int h2(int mont)//????2
{
	return(mont>2);
}
int g(int m, int d)
{
	int i, fromto=0;
	for(i=1; i<m; i++) {
		fromto=fromto+month[i];
	//	if (f(startYear) && (m == 2)) fromto++; 
	}
	return (fromto+d);
}
void main()
{
	int sy,sm,sd,ey,em,ed,i,j,k,sum;
	int a[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	int b[12]={31,28,31,30,31,30,31,31,30,31,30,31};
        
	scanf("%d %d %d",&sy,&sm,&sd);
    scanf("%d %d %d",&ey,&em,&ed);
    sum=0;
	if (sy!=ey)
	{
		if (sy+1<=ey-1)
    	{
	    	for(i=sy+1;i<=ey-1;i++)
		    	if ((i%4==0&&i%100!=0)||(i%400==0)) sum=sum+366;
			    else sum=sum+365;
    	}
	
	    if ((sy%4==0&&sy%100!=0)||(sy%400==0))
	    {
		    if (sm<12)
			    for(j=sm+1;j<=12;j++)
				    sum=sum+a[j-1];
			sum=sum+a[sm-1]-sd+1;
    	}
	    else
    	{
            if (sm<12)
		    	for(j=sm+1;j<=12;j++)
			    	sum=sum+b[j-1];
			sum=sum+b[sm-1]-sd+1;
    	}
 	
	    if ((ey%4==0&&ey%100!=0)||(ey%400==0))
	    {
		    if (em>1)
			    for(j=1;j<=em-1;j++)
				    sum=sum+a[j-1];
			sum=sum+ed;
	    }
	    else
	    {
            if (em>1)
			    for(j=1;j<=em-1;j++)
				    sum=sum+b[j-1];
			sum=sum+ed;
    	}
	}
	else
	{
		if ((sy%4==0&&sy%100!=0)||(sy%400==0))
	    {
		    if (sm!=em)
			{
				if (sm+1<=em-1)
			        for(k=sm+1;k<=em-1;k++)
				        sum=sum+a[k-1];
			    sum=sum+a[sm-1]-sd+1;
			    sum=sum+ed;
			}
			else
				sum=sum+ed-sd+1;
    	}
	    else
    	{
            if (sm!=em)
			{
				if (sm+1<=em-1)
			        for(k=sm+1;k<=em-1;k++)
				        sum=sum+b[k-1];
			    sum=sum+b[sm-1]-sd+1;
			    sum=sum+ed;
			}
			else
				sum=sum+ed-sd+1;
    	}
	}
	printf("%d\n",sum-1);
}
void main()
{
	int i,j,t=0,y1,y2,m1,m2,d1,d2,t1=0,t2=0;
	scanf("%d %d %d",&y1,&m1,&d1);
	scanf("%d %d %d",&y2,&m2,&d2);
	for(i=y1;i<y2;i++)
		for(j=1;j<13;j++)
		{
			if(j==1||j==3||j==5||j==7||j==8||j==10||j==12)
				t=t+31;
			else if(j==4||j==6||j==9||j==11)
				t=t+30;
		    else if(j==2)
			{
				if(i%400==0||i%4==0&&i%100!=0)
					t=t+29;
				else 
					t=t+28;
			}
		}
    for(j=1;j<m1;j++)
	{
		if(j==1||j==3||j==5||j==7||j==8||j==10||j==12)
				t1=t1+31;
			else if(j==4||j==6||j==9||j==11)
				t1=t1+30;
		    else if(j==2)
			{
				if(y1%400==0||y1%4==0&&y1%100!=0)
					t1=t1+29;
				else 
					t1=t1+28;
			}
	}
	t1=t1+d1;
	for(j=1;j<m2;j++)
		{
		     if(j==1||j==3||j==5||j==7||j==8||j==10||j==12)
				t2=t2+31;
			else if(j==4||j==6||j==9||j==11)
				t2=t2+30;
		    else if(j==2)
			{
				if(y2%400==0||y2%4==0&&y2%100!=0)
					t2=t2+29;
				else 
					t2=t2+28;
			}
	}
	t2=t2+d2;
	t=t-t1+t2;
	printf("%d\n",t);
}
int day[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
int leapday[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int leapyear (int n)
{
	return ((n%4==0 && n%100!=0) || (n%400==0));
}
int count (int a,int b,int c)
{
	int leapyear(int n);
	int m=0,i;
	if (leapyear(a)==0)
	{
		for (i=0;i<b;i++)
		{
			m=m+day[i];
		}
	}
	else
	{
		for (i=0;i<b;i++)
		{
			m=m+leapday[i];
		}
	}
	m=m+c;
	return m;
}
int main()
{
	int j,a,b,c,d,e,f,sum=0;
	int leapyear(int n);
	int count(int a,int b,int c);
	scanf("%d %d %d\n%d %d %d",&a,&b,&c,&d,&e,&f);
	if (a<d)
	{
	    for (j=a;j<d;j++)
		{
			if (leapyear(j)==0)
			{
				sum=sum+365;
			}
			else if (leapyear(j)==1)
			{
				sum=sum+366;
			}
		}
		sum=sum+count(d,e,f)-count(a,b,c);
	}
	else if (a==d)
	{
		sum=count(d,e,f)-count(a,b,c);
	}
	printf("%d",sum);
	return 0;
}
int y(int year)
{
	if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
                   return 366;
	else
		 return 365;
}
int m(int y,int m)
{
	int d;
	switch(m)
	{
	case 1:case 3:case 5:case 7:case 8:case 10:case 12:
		d=31;
		break;
	case 4:case 6:case 9:case 11:
		d=30;
                  break;
	case 2:
		if((y % 4 == 0 && y % 100 != 0) || (y % 400 == 0))
			d=29;
		else 
			d=28;
		break;
	}
	return d;
}

int main()
{
	int y1,m1,d1;
	int y2,m2,d2;
	scanf("%d %d %d",&y1,&m1,&d1);
	scanf("%d %d %d",&y2,&m2,&d2);
         int d=0;
         int p1=0;
         int p2=0;
	int i;
	
	for(i=m1;i<=12;i++)
		p1=p1+m(y1,i);
	p1-=d1;

	for(i=1;i<=m2;i++)
		p2=p2+m(y2,i);
	p2=p2-m(y2,m2)+d2;

	if(y2-y1>1)
	{
           	for(i=y1+1;i<y2;i++)
			d=d+y(i);
                  d=d+p1+p2;

	         printf("%d",d);
         }
         if(y2-y1==1)
         {
                  d=p1+p2;
                  printf("%d",d);
         }
         if(y2==y1)
         {
               d=p1+p2-y(y1); 
               printf("%d",d);
         }
	return 0;
}
int main()
{
	int i,year[2],month[2],day[2],days=0;
	for(i=0;i<2;i++)
		cin>>year[i]>>month[i]>>day[i];

	days+=(year[1]-year[0]-1)*365;         //????
	for(i=year[0];i<year[1];i++)
		if((i%4==0&&i%100!=0)||(i%400==0))
			days++;             //????1 **

		int dayofmon[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
                                                 //??????
		for(i=month[0];i<=12;i++)          //???
			days+=dayofmon[i];
		days-=day[0];                //??????day[0]?
		if(((year[0]%4==0&&year[0]%100!=0)||(year[0]%400==0))&&month[0]>2)                                     //????????2?29??????
			days--;        //?**????????

		for(i=1;i<month[1];i++)           //???
			days+=dayofmon[i];
		days+=day[1];
		if(((year[1]%4==0&&year[1]%100!=0)||(year[1]%400==0))&&month[1]>2)                                   //????2?29?????
			days++;      //?1
		
		cout<<days;
		return 0;
}
int main()
{
	int sum=0,day=0,p=0,i,k,count=0,x=0,y=0,year1,month1,day1,year2,month2,day2;
	int month[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	cin >> year1 >> month1 >> day1;
	cin >> year2 >> month2 >> day2;
	for (i=year1+1;i<year2;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
		{
			count++;
		}
	}
	if ((year1%4==0&&year1%100!=0)||(year1%400==0))
	{
		if (month1==1)
		{
			x++;
		}
		if (month1==2)
		{
			if(day1<29)
			{
				x++;
			}
		}
	}
	if ((year2%4==0&&year2%100!=0)||(year2%400==0))
	{
		if (month2>2)
		{
			y++;
		}
		if (month2==2)
		{
			if(day2==29)
			{
				y++;
			}
		}
	}
	for (k=0;k<month1-1;k++)
	{
		day+=month[k];
	}
	day+=day1;
	for (k=11;k>month2-1;k--)
	{
		p+=month[k];
	}
	p+=month[month2-1]-day2;
	sum=365*(year2-year1+1)-day-p+x+y+count;
	//cout << day << " " << p << " " << x << " " << y << endl;
	cout << sum << endl;
	return 0;
}
void main()
{
	int N1,N2,Y1,Y2,R1,R2,i,j,k,m,n,l,x1,x2;
	int MONTH[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int RUNMONTH[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
	scanf("%d%d%d%d%d%d",&N1,&Y1,&R1,&N2,&Y2,&R2);
	x1=365*(N1-1);
	x2=365*(N2-1);
	for(i=0;i<N1;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
			x1=x1+1;
	}
	for(i=0;i<N2;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
			x2=x2+1;
	}
	for(i=1;i<Y1;i++)
	{
		if((N1%4==0&&N1%100!=0)||(N1%400==0))
			x1=x1+RUNMONTH[i];
		else x1=x1+MONTH[i];
	}
	for(i=1;i<Y2;i++)
	{
		if((N2%4==0&&N2%100!=0)||(N2%400==0))
			x2=x2+RUNMONTH[i];
		else x2=x2+MONTH[i];
	}
	x1=x1+R1;
	x2=x2+R2;
	k=x2-x1;
	printf("%d",k);
}
void main()
{int SY,SM,SD,EY,EM,ED,i,c,d,e,n;
e=0;
scanf("%d %d %d\n %d %d %d",&SY,&SM,&SD,&EY,&EM,&ED);	
if(0<SY<3001&&0<EY<3001)
{if((SY%4==0&&SY%100!=0)||(SY%400==0))
 {
  if(SM==1) d=SD;
  if(SM==2) d=SD+31;
  if(SM==3) d=SD+60;
  if(SM==4) d=SD+91;
  if(SM==5) d=SD+121;
  if(SM==6) d=SD+152;
  if(SM==7) d=SD+182;
  if(SM==8) d=SD+213;
  if(SM==9) d=SD+244;
  if(SM==10) d=SD+274;
  if(SM==11) d=SD+305;
  if(SM==12) d=SD+335;
  }
else
 {
  if(SM==1) d=SD;
  if(SM==2) d=SD+31;
  if(SM==3) d=SD+59;
  if(SM==4) d=SD+90;
  if(SM==5) d=SD+120;
  if(SM==6) d=SD+151;
  if(SM==7) d=SD+181;
  if(SM==8) d=SD+212;
  if(SM==9) d=SD+243;
  if(SM==10) d=SD+273;
  if(SM==11) d=SD+304;
  if(SM==12) d=SD+334;
  }
if((EY%4==0&&EY%100!=0)||(EY%400==0))
 {
  if(EM==1) c=ED;
  if(EM==2) c=ED+31;
  if(EM==3) c=ED+60;
  if(EM==4) c=ED+91;
  if(EM==5) c=ED+121;
  if(EM==6) c=ED+152;
  if(EM==7) c=ED+182;
  if(EM==8) c=ED+213;
  if(EM==9) c=ED+244;
  if(EM==10) c=ED+274;
  if(EM==11) c=ED+305;
  if(EM==12) c=ED+335;
  }
else
 {
  if(EM==1) c=ED;
  if(EM==2) c=ED+31;
  if(EM==3) c=ED+59;
  if(EM==4) c=ED+90;
  if(EM==5) c=ED+120;
  if(EM==6) c=ED+151;
  if(EM==7) c=ED+181;
  if(EM==8) c=ED+212;
  if(EM==9) c=ED+243;
  if(EM==10) c=ED+273;
  if(EM==11) c=ED+304;
  if(EM==12) c=ED+334;
  }
for(i=SY;i<EY;i++)
{if((i%4==0&&i%100!=0)||(i%400==0)) e=e+366;
else e=e+365;}
n=e+c-d;
printf("%d",n);
}
}
int accountdays(int year, int month, int day)
{
	int days = 0,i;
	for(i = 1; i <= month; i++)
	{
		if(i == 4 || i == 6 || i == 9 || i == 11)
			days += 30;
		else if(i == 2)
		{
			if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
				days += 29;
			else days += 28;
		}
		else days += 31;
	}
	i = month;
	if(i == 4 || i == 6 || i == 9 || i == 11)
			days = days - (30 - day);
	else if(i == 2)
		{
			if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
				days -= 29 - day;
			else days -= 28 - day;
		}
	else days -= 31 - day;
	return days;
}



int main()
{
	int year[2], month[2], day[2], days1, days2 ,i;

	cin >> year[0] >> month[0] >> day[0];
	cin >> year[1] >> month[1] >> day[1];

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

}
int main(int argc)
{   int y1,y2,m1,m2,d1,d2,k,i,j;
int m[12]={31,28,31,30,31,30,31,31,30,31,30,31};
    cin>>y1>>m1>>d1>>y2>>m2>>d2;
	k=0;
    for (i=y1+1;i<y2;i++)
	{ if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
	{k=k+366;}
	else {k=k+365;}}
	if(y1==y2&&m1==m2)
	{k=d2-d1;}
	else
	{if ((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0))
	{m[1]=29;}
	for (i=m1;i<=11;i++)
	{k=k+m[i];}
	if ((y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0))
	{m[1]=29;}
	else {m[1]=28;}
	for (i=0;i<m2-1;i++)
	{k=k+m[i];}
	k=k+m[m1+1]-d1+d2;}
	cout<<k;
	 return 0;
	}
int judge(int n)
{if (((n%4==0) && ((n%100)!=0))||((n%400)==0)) return 1; else return 0;
}
int add(int g[15],int year,int mon,int day)
{ int i,s=0;
  	if (judge(year)) 
	{
		g[2]++;   
	for (i=1;i<=mon-1;i++) s+=g[i];
	s+=day;
	g[2]--;
	}
	else
	{for (i=1;i<=mon-1;i++) s+=g[i];
	s+=day;}
	return(s);
}
int main()
{


	int u=0,year,a,b,c,d,e,f,g[15]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	scanf("%d %d %d",&a,&b,&c);
	scanf("%d %d %d",&d,&e,&f);
	int i,j;
	if (a==d) u+=add(g,a,e,f)-add(g,a,b,c);
	else
	{
	if (judge(a)) u+=366-add(g,a,b,c);
	else u+=365-add(g,a,b,c);
	for (i=a+1;i<=d-1;i++) {if (judge(i)) u+=366; else u+=365;}
    u+=add(g,d,e,f); 
	}
	printf("%d",u);
}
int leapYear(int year)
{
	if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		return 366;
	else return 365;
}
int main ()
{
	int startYear = 0, startMonth = 0, startDay = 0, endYear = 0, endMonth = 0, endDay = 0;//???????
	cin >> startYear >> startMonth >> startDay >> endYear >> endMonth >> endDay;
	int sum = 0, i = 0, j = 0;
	int leap[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
		ping[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
	for(i = startYear; i < endYear; i++)
		sum = sum + leapYear(i);
	for(i = 1; i < startMonth; i ++)
	{
		if(leapYear(startYear == 366))
			sum = sum - leap[i];
		else 
			sum = sum - ping[i];
	}
	sum = sum - startDay;
	for(i = 1; i < endMonth; i ++)
	{
		if(leapYear(endYear == 366))
			sum = sum + leap[i];
		else 
			sum = sum + ping[i];
	}
	sum = sum + endDay;
	cout << sum;

	return 0;
}
int leap(int);
int main()
{
	int sy,sm,sd,ey,em,ed,sum=0,a[13],b[13],i;
	for(i=1;i<13;i++)
	{
		if(i==2)
		{
			a[i]=28;
		}
		else if(i==4||i==6||i==9||i==11)
		{
			a[i]=30;
		}
		else
		{
			a[i]=31;
		}
	}
    for(i=1;i<13;i++)
	{
		if(i==2)
		{
			b[i]=29;
		}
		else if(i==4||i==6||i==9||i==11)
		{
			b[i]=30;
		}
		else
		{
			b[i]=31;
		}
	}
	cin>>sy>>sm>>sd>>ey>>em>>ed;
	if(sy==ey)
	{
		if(sm==em)
		{
			sum+=ed-sd;
		}
		else
		{
			for(i=sm+1;i<=em-1;i++)
			{
			if(i==2)
			{
				if(leap(sy))
				{
					sum+=b[i];
				}
				else
				{
					sum+=a[i];
				}
			}
			else
			{
				sum+=a[i];
			}
		}
		sum=sum+ed-1;
		if(sm==2)
		{
			if(leap(sy))
			{
				sum+=b[2]-sd+1;
			}
			else
			{
				sum+=a[2]-sd+1;
			}
		}
		else
		{
			sum=sum+a[sm]-sd+1;
		}
	}
		cout<<sum<<endl;
	}
	else
	{
		for(i=sy+1;i<=ey-1;i++)
		{
			if(leap(i))
			{
				sum+=366;
			}
			else
			{
				sum+=365;
			}
		}
		for(i=1;i<=em-1;i++)
		{
			if(i==2)
			{
				if(leap(ey))
				{
					sum+=b[i];
				}
				else
				{
					sum+=a[i];
				}
			}
			else
			{
				sum+=a[i];
			}
		}
		sum+=ed-1;
		for(i=sm+1;i<=12;i++)
		{
			if(i==2)
			{
				if(leap(sy))
				{
					sum+=b[i];
				}
				else
				{
					sum+=a[i];
				}
			}
			else
			{
				sum+=a[i];
			}
		}
		if(sm==2)
		{
			if(leap(sy))
			{
				sum+=b[2]-sd+1;
			}
			else
			{
				sum+=a[2]-sd+1;
			}
		}
		else
		{
			sum+=a[sm]-sd+1;
		}
		cout<<sum<<endl;
	}
	return 0;
}
int leap(int n)
{
	if(n%100==0)
	{
		if(n%400==0)
		{
			return 1;
		}
		else
		{
			return 0;
		}
	}
	else 
	{
		if(n%4==0)
		{
			return 1;
		}
		else
		{
		    return 0;
		}
	}
	return 0;
}
const int monthlength[12] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30};

inline int isLeapYear(int yearAD)
{
	if (yearAD % 4 == 0 && (yearAD % 100 != 0 || yearAD % 400 == 0))
		return 1;
	return 0;
}

int main()
{
	int y1, y2, m1, m2, d1, d2, delta;
	cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
	delta = d2 - d1;
	if (m1 < m2)
	{
		for (; m1 < m2; m1++)
		{
			if (m1 == 2)
				delta += 28 + isLeapYear(y1) + isLeapYear(y2);
			else
				delta += monthlength[m1];
		}
	}
	else
	{
		for (; m1 > m2; m1--)
		{
			if (m1 == 2)
				delta -= 28 + isLeapYear(y1) + isLeapYear(y2);
			else
				delta -= monthlength[m1];
		}
	}
	for (; y1 < y2; y1++)
		if (isLeapYear(y1))
			delta += 366;
		else
			delta += 365;
	cout << delta;
	return 0;
}