semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int mon[13];
	mon[1]=31;mon[2]=28;mon[3]=31;mon[4]=30;mon[5]=31;mon[6]=30;mon[7]=31;mon[8]=31;mon[9]=30;mon[10]=31;mon[11]=30;mon[12]=31;
	int lmon[13];
	lmon[1]=31;lmon[2]=29;lmon[3]=31;lmon[4]=30;lmon[5]=31;lmon[6]=30;lmon[7]=31;lmon[8]=31;lmon[9]=30;lmon[10]=31;lmon[11]=30;lmon[12]=31;
	int y1,y2,m1,m2,d1,d2,days=0,i;
	cin>>y1>>m1>>d1;
	cin>>y2>>m2>>d2;
	if(y2==y1&&((y1%4==0&&y1%100!=0)||(y1%400==0)))
	{
		if(m1!=m2)
		{
			for(i=m1+1;i<m2;i++)
				days=lmon[i]+days;
			days=lmon[m1]-d1+days;
			days=days+d2;
			cout<<days;
			return 0;
		}
		else
			cout<<d2-d1;
	}
	else if(y1==y2)
	{
		if(m1!=m2)
		{
			for(i=m1+1;i<m2;i++)
				days=mon[i]+days;
			days=mon[m1]-d1+days;
			days=days+d2;
			cout<<days;
			return 0;
		}
		else
			cout<<d2-d1;
	}
	else
	{
		for(i=y1+1;i<y2;i++)
			if((i%4==0&&i%100!=0)||(i%400==0))
				days=days+366;
			else
				days=days+365;
		if((y1%4==0&&y1%100!=0)||(y1%400==0))
		{
			for(i=m1+1;i<13;i++)
				days=lmon[i]+days;
			days=lmon[m1]-d1+days;
		}
		else if(!((y1%4==0&&y1%100!=0)||(y1%400==0)))
		{
			for(i=m1+1;i<13;i++)
				days=mon[i]+days;
			days=mon[m1]-d1+days;
		}
		if((y2%4==0&&y2%100!=0)||(y2%400==0))
		{
			for(i=1;i<m2;i++)
				days=lmon[i]+days;
			days=days+d2;
		}
		else if(!((y2%4==0&&y2%100!=0)||(y2%400==0)))
		{
			for(i=1;i<m2;i++)
				days=mon[i]+days;
			days=days+d2;
		}
		cout<<days;
	}
	return 0;
}
//???????????
int main()
{
	int year1,year2,month1,month2,day1,day2,sum=0,i;
	int days[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	cin>>year1>>month1>>day1;
	cin>>year2>>month2>>day2;
	if (year1==year2)
	{
		if (month1==month2)//????
			sum=day2-day1;
		else//?????
		{
			sum+=days[month1]-day1;
			for (i=month1+1;i<month2;i++)
				sum+=days[i];
			sum+=day2;
		}
	}
	else//???
	{
		sum+=days[month1]-day1;
		for (i=month1+1;i<=12;i++)
		{
			if (i==2)
			{
				if (year1%4==0&&year1%100!=0||year1%400==0)
					sum+=days[i]+1;
				else
					sum+=days[i];
			}
			else	
				sum+=days[i];
		}
		for (i=year1+1;i<year2;i++)
		{
			if (i%4==0&&i%100!=0||i%400==0)
				sum+=366;
			else
				sum+=365;
		}
		for (i=1;i<month2;i++)			
		{
			if (i==2)
			{
				if (year2%4==0&&year2%100!=0||year2%400==0)
					sum+=days[i]+1;
				else
					sum+=days[i];
			}
			else	
				sum+=days[i];
		}
		sum+=day2;
	}
	cout<<sum<<endl;
	return 0;
}
int days(int x, int y, int z)
{
	int sum = 0;
	int leap = (x % 4 == 0 && x % 100 != 0) || (x % 400 == 0);
	for (int i = 1; i < y; i ++)
	{
		if (i == 4 || i == 6 || i == 9 || i == 11)
		{
			sum += 30;
		}
		else if (i == 2)
		{
			sum += (leap + 28);
		}
		else
		{
			sum += 31;
		}
	}
	sum += z;
	return sum;
}
int main()
{
	int x, y, a, z, b, c, sum = 0;
	cin >> x >> y >> z >> a >> b >> c;
	for (int i = x; i < a; i ++)
	{
		if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
		{
			sum += 366;
		}
		else
		{
			sum += 365;
		}

	}
	sum = sum + days(a, b, c) - days(x, y, z);
	cout << sum << endl;
	return 0;
}
int main()
{
	int a[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, b[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
	int sy, sm, sd, ey, em, ed, y, s = 0, i, j;
	cin >> sy >> sm >> sd >> ey >> em >> ed;
	if(ey > sy)
	{
		for(i = sm - 1; i < 12; i++)
		{
			if((sy % 4 == 0 && sy % 100 != 0) || (sy % 400 == 0))
			 s = s + b[i];
			else
				s = s + a[i];
		}
		for(i = sy + 1; i < ey; i++)
			if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
				for(int j = 0; j < 12; j++)
					s = s + b[j];
			else
				for(int j = 0; j < 12; j++)
					s = s + a[j];
			if((ey % 4 == 0 && ey % 100 != 0) || (ey % 400 == 0))
			for(int j = 0; j < em - 1; j++)
			{
				s = s + b[j];
			}
			else
				for(int j = 0; j < em - 1; j++)
				{
				s = s + a[j];
				}
	}
	else
	{
		for(i = sm - 1; i < em - 1; i++)
		{
			if((sy % 4 == 0 && sy % 100 != 0) || (sy % 400 == 0))
			 s = s + b[i];
			else
				s = s + a[i];
		}
	}
	s = s + ed - sd;
	cout << s;
	return 0;
}
int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};

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

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

countmonth(int year,int month,int day)
{
	int n=0,i;
	if((year%4==0&&year%100!=0)||year%400==0)
		a[2]=29;
	for(i=1;i<month;i++)
		n+=a[i];
	n=n+day;
	return n;
}
int main()
{
	int year1,month1,day1, year2,month2,day2;
	int sum = 0,flag =0,i;
	int year,month[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
	cin >> year1 >> month1 >> day1;
	cin >> year2 >> month2 >> day2;
	for (year = year1;year <= year2;year++)
	{
		flag = 0;
		if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
			flag = 1;
		if (year1 == year2)
		{
			for (i = month1;i < month2;i++)
			{
				sum += month[i];
			}
			sum = sum + day2 - day1;
			if (flag && month1 <= 2 && month2 > 2)
				sum ++;
		}
		else
		{
			if (year == year1)
			{
				for (i = month1;i <= 12;i++)
				{
					sum += month[i];
				}
				sum = sum  - day1;
				if (flag && (month1 <= 2))
					sum ++;
			}
			else if (year < year2)
			{
				sum += 365;
				if (flag)
					sum++;
			}
			if (year == year2)
			{
				for (i = 1;i < month2;i++)
				{
					sum += month[i];
				}
				sum = sum + day2;
				if (flag && (month1 <= 2 || month2 > 2))
					sum ++;
			}
			month1 = 1;
		}
	}
	cout << sum;
	return 0;
}
long sum(int y,int m,int d)
{
int i,x[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
long s=0;
for(i=1;i<y;i++)
  {if(i%4==0&&i%100!=0||i%400==0)s+=366;
  else s+=365;}
if(y%4==0&&y%100!=0||y%400==0)x[2]=29;
for(i=0;i<m;i++)s+=x[i];
s+=d;
return s;
}
void main()
{
int y1,y2,m1,m2,d1,d2;
scanf("%d %d %d",&y1,&m1,&d1);
scanf("%d %d %d",&y2,&m2,&d2);
printf("%ld",sum(y2,m2,d2)-sum(y1,m1,d1));
}
int abs(int a, int b)
{
	if(a<=b)
		return(b-a);
	else
		return(a-b);
}

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

int Days(int y, int m, int d)
{
	int days[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	int i;
	int s=0;
	if(Leap(y))
		days[2]=29;
	for(i=0;i<m;i++)
		s=s+days[i];
	s=s+d;
	return s;
}

int main(int y1,int y2,int m1,int m2,int d1,int d2)
{
	int s1,s2;
	int s=0;
	int i;
	scanf("%d %d %d",&y1,&m1,&d1);
	scanf("%d %d %d",&y2,&m2,&d2);

	if(y1==y2)
	{
		s1=Days(y1,m1,d1);
		s2=Days(y2,m2,d2);
		s=abs(s1,s2);
	}
	else
		if(y2-y1==1)
		{
			s1=Days(y1,12,31)-Days(y1,m1,d1);
			s2=Days(y2,m2,d2);
			s=s1+s2;
		}
		else
		{
			for(i=y1+1;i<y2;i++)
				s=s+Days(i,12,31);
			s1=Days(y1,12,31)-Days(y1,m1,d1);
			s2=Days(y2,m2,d2);
			s=s+s1+s2;
		}
	printf("%d\n",s);
}
int month[12]={31,28,31,30,31,30,31,31,30,31,30,31};
main()
{int y1,m1,d1;
 int y2,m2,d2;
int sum=0;
     scanf("%d %d %d",&y1,&m1,&d1);
     scanf("%d %d %d",&y2,&m2,&d2);
     m1=m1-1;
     m2=m2-1;
         for(;;)
{          if(y1==y2&&m1==m2&&d1==d2)
                       break;
sum++;        
d1++;
       if ((y1%4==0&&y1%100!=0)||y1%400==0)
                    month[1]=29;
         else
                     month[1]=28; 
        if(d1>month[m1])
                 {
                   m1++; 
                   d1=1;
                 }
          if(m1==12)
          {   y1++;
                m1=0;
}

          
}
printf("%d",sum);
        
}
int main()
{
 long a1,b1,c1,a2,b2,c2,i1,i2,sum1,sum2,d;
 scanf("%ld %ld %ld",&a1,&b1,&c1);
 scanf("%ld %ld %ld",&a2,&b2,&c2);
 sum1=0;
 sum2=0;
  for(i1=1;i1<a1;i1++)
  {
   if ((i1%4 ==0&&i1%100!=0)||(i1%400==0)) {sum1=sum1+366;}
   else {sum1=sum1+365;}
  }
 if ((a1%4==0&&a1%100!=0&&b1>2)||(a1%400==0)) {sum1=sum1+1;}
 switch(b1)
 {
  case 1:sum1=sum1;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;
  default:sum1=sum1+334;
  }
 sum1=sum1+c1;
 for(i2=1;i2<a2;i2++)
 {
  if((i2%4==0&&i2%100!=0)||(i2%400==0)) {sum2=sum2+366;}
  else {sum2=sum2+365;}
 }
 if ((a2%4==0&&a2%100!=0&&b2>2)||(a2%400==0)) {sum2=sum2+1;}
 switch(b2)
 {
  case 1:sum2=sum2;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;
  default:sum2=sum2+334;
  }
 sum2=sum2+c2;
 d=sum2-sum1;
 printf("%ld",d);
 return 0;
}
int main()
{
	int y1,y2,m1,m2,d1,d2;
	int md1[12]={31,28,31,30,31,30,31,31,30,31,30,31},md2[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	int jl=0;
	int i,j,k;
	cin>>y1>>m1>>d1;
	cin>>y2>>m2>>d2;
	for(i=y1;i<y2;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
		{
			jl+=366;
		}
		else
		{
			jl+=365;
		}
	}
	if((y1%4==0&&y1%100!=0)||(y1%400==0))
	{
		for(i=0;i<m1-1;i++)
		{
			jl-=md2[i];
		}
		jl-=d1;
	}
	else
	{
		for(i=0;i<m1-1;i++)
		{
			jl-=md1[i];
		}
		jl-=d1;
	}
	if((y2%4==0&&y2%100!=0)||(y2%400==0))
	{
		for(i=0;i<m2-1;i++)
		{
			jl+=md2[i];
		}
		jl+=d2;
	}
	else
	{
		for(i=0;i<m2-1;i++)
		{
			jl+=md1[i];
		}
		jl+=d2;
	}
	cout<<jl<<endl;
	return 0;
}
void main()
{
	int s=0,i;
	struct Date
	{
		int year;int month;int day;
	}date1,date2;
	scanf("%d%d%d",&date1.year,&date1.month,&date1.day);
	scanf("%d%d%d",&date2.year,&date2.month,&date2.day);
	s+=(date2.year-date1.year)*365;
	s+=(date2.month-date1.month)*30;
	s+=(date2.day-date1.day);
	for(i=date1.year;i<date2.year;i++)
	{
		if((i%4==0&&i%100!=0)||(i%400==0))
		s++;
	}
	if(date2.month>=date1.month)
	{
		for(i=date1.month;i<date2.month;i++)
		{
			if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
				s++;
			if(i==2)
			{
				if((date2.year%4==0&&date2.year%100!=0)||(date2.year%400==0))
					s--;
				else
					s=s-2;
			}
		}
	}
	else
	{
	    for(i=date2.month;i<date1.month;i++)
		{
			if(i==1||i==3||i==5||i==7||i==8||i==10||i==12)
				s--;
			if(i==2)
			{
				if((date2.year%4==0&&date2.year%100!=0)||(date2.year%400==0))
					s++;
				else
					s=s+2;
			}
		}
	}
	printf("%d",s);
}
int main()
{
    int startYear,startMonth,startDay,endYear,endMonth,endDay,i,j,a,b,c=0,d,m,n,x,y,sum;
    scanf("%d%d%d%d%d%d",&startYear,&startMonth,&startDay,&endYear,&endMonth,&endDay);
    a=endYear-startYear;
    sum=365*a;
    for(b=startYear;b<endYear;b++)
  {  if((b % 4 == 0 && b % 100 != 0) || (b % 400 == 0))
    c++;}
    sum=sum+c;
    if((startYear % 4 == 0 && startYear % 100 != 0) || (startYear % 400 == 0))
   {m=29; if(startMonth==1){x=startDay;}if(startMonth==2){x=31+startDay;}
    if(startMonth==3){x=31+m+startDay;}if(startMonth==4){x=31+m+31+startDay;}if(startMonth==5){x=31+m+31+30+startDay;}
    if(startMonth==6){x=31+m+31+30+31+startDay;}if(startMonth==7){x=31+m+31+30+31+30+startDay;}
    if(startMonth==8){x=31+m+31+30+31+30+31+startDay;}if(startMonth==9){x=31+m+31+30+31+62+30+startDay;}
    if(startMonth==10){x=31+m+31+30+31+62+30+30+startDay;}if(startMonth==11){x=31+m+31+30+31+62+61+30+startDay;}
    if(startMonth==12){x=31+m+31+30+31+62+61+30+30+startDay;}} 
    else
     {m=28; if(startMonth==1){x=startDay;}if(startMonth==2){x=31+startDay;}
    if(startMonth==3){x=31+m+startDay;}if(startMonth==4){x=31+m+31+startDay;}if(startMonth==5){x=31+m+31+30+startDay;}
    if(startMonth==6){x=31+m+31+30+31+startDay;}if(startMonth==7){x=31+m+31+30+31+30+startDay;}
    if(startMonth==8){x=31+m+31+30+31+30+31+startDay;}if(startMonth==9){x=31+m+31+30+31+62+30+startDay;}
    if(startMonth==10){x=31+m+31+30+31+62+30+30+startDay;}if(startMonth==11){x=31+m+31+30+31+62+61+30+startDay;}
    if(startMonth==12){x=31+m+31+30+31+62+61+30+30+startDay;}} 
    sum=sum-x;
    if((endYear % 4 == 0 && endYear % 100 != 0) || (endYear % 400 == 0))
   {m=29; if(endMonth==1){y=endDay;}if(endMonth==2){y=31+endDay;}
    if(endMonth==3){y=31+m+endDay;}if(endMonth==4){y=31+m+31+endDay;}if(endMonth==5){y=31+m+31+30+endDay;}
    if(endMonth==6){y=31+m+31+30+31+startDay;}if(endMonth==7){y=31+m+31+30+31+30+endDay;}
    if(endMonth==8){y=31+m+31+30+31+30+31+startDay;}if(endMonth==9){y=31+m+31+30+31+62+30+endDay;}
    if(endMonth==10){y=31+m+31+30+31+62+30+30+startDay;}if(endMonth==11){y=31+m+31+30+31+62+61+30+endDay;}
    if(endMonth==12){y=31+m+31+30+31+62+61+30+30+endDay;}} 
    else
       {m=28; if(endMonth==1){y=endDay;}if(endMonth==2){y=31+endDay;}
    if(endMonth==3){y=31+m+endDay;}if(endMonth==4){y=31+m+31+endDay;}if(endMonth==5){y=31+m+31+30+endDay;}
    if(endMonth==6){y=31+m+31+30+31+startDay;}if(endMonth==7){y=31+m+31+30+31+30+endDay;}
    if(endMonth==8){y=31+m+31+30+31+30+31+startDay;}if(endMonth==9){y=31+m+31+30+31+62+30+endDay;}
    if(endMonth==10){y=31+m+31+30+31+62+30+30+startDay;}if(endMonth==11){y=31+m+31+30+31+62+61+30+endDay;}
    if(endMonth==12){y=31+m+31+30+31+62+61+30+30+endDay;}} 
    sum=sum+y;
    printf("%d",sum);
    return 0;}
int judge(int n)
{
	if((n%4==0&&n%100!=0)||(n%400==0))
	return 1;
	else return 0;
}
int main()
{
	int a[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	int year1, month1,day1,year2,day2,month2;
	cin>>year1>>month1>>day1>>year2>>month2>>day2;
	int i=1,time1=0,time2=0;
	a[1]=judge(year1)+28;
	for(i=1;i<month1;i++)
	{   
		time1+=a[i-1];
	}
	time1+=day1-1;
	a[1]=judge(year2)+28;
	for(i=1;i<month2;i++)
	{    
		time2+=a[i-1];
	}
	time2+=day2-1;
	int time=0;
	for(i=year1;i<year2;i++)
	{
		time+=365+judge(i);
		

	}
	int result;
	
	result=time+time2-time1;
	
	cout<<result;
		return 0;
}
int main(){
    int y1,y2,m1,m2,d1,d2,days=0,i;
    scanf("%d %d %d",&y1,&m1,&d1);
    scanf("%d %d %d",&y2,&m2,&d2);
    if(y1<y2){
    for(i=y1+1;i<y2;i++){
                         if((i%4==0&&i%100!=0)||i%400==0)
                         days=days+366;
                         else
                         days=days+365;
                         }
    for(i=m1+1;i<13;i++){
                         if(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((y1%4==0&&y1%100!=0)||y1%400==0)
                         days=days+29;
                         else
                         days=days+28;
                         }
    for(i=1;i<m2;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((y2%4==0&&y2%100!=0)||y2%400==0)
                      days=days+29;
                      else
                      days=days+28;
                      }
    if(m1==1||m1==3||m1==5||m1==7||m1==8||m1==10||m1==12)
    days=days+31-d1;
    else if(m1==4||m1==6||m1==9||m1==11)
    days=days+30-d1;
    else if((y1%4==0&&y1%100!=0)||y1%400==0)
    days=days+29-d1;
    else
    days=days+28-d1;
    days=days+d2;
    }
    else if(m1<m2){
                   for(i=m1+1;i<m2;i++){
                                         if(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((y1%4==0&&y1%100!=0)||y1%400==0)
                                         days=days+29;
                                         else
                                         days=days+28;
                                        }
                   if(m1==1||m1==3||m1==5||m1==7||m1==8||m1==10||m1==12)
                   days=days+31-d1;
                   else if(m1==4||m1==6||m1==9||m1==11)
                   days=days+30-d1;
                   else if((y1%4==0&&y1%100!=0)||y1%400==0)
                   days=days+29-d1;
                   else
                   days=days+28-d1;
                   days=days+d2;
                   }
    else
    days=d2-d1;
    printf("%d",days);
    return 0;
}
int main(int argc, char *argv[])
{
    int f(int y);
    int g(int y,int m,int d);
    int y1,y2,m1,m2,d1,d2,x=0,i;
    scanf("%d%d%d",&y1,&m1,&d1);
    scanf("%d%d%d",&y2,&m2,&d2);
    x=g(y2,m2,d2)-g(y1,m1,d1);
    if (y1!=y2) 
    {for(i=y1;i<=y2-1;i++)
     {
         x+=(365+f(i));
     }
    } 
    printf("%d",x);	
    return 0;
}
int f(int y)
{int x;
x=((y%4==0&&y%100!=0)||(y%400==0)==1) ? 1:0;
if(x==1) return 1;
if(x==0) return 0;
}
int g(int y,int m,int d)
{   
    int t=0,j,mon[13];
    mon[0]=0;mon[1]=mon[3]=mon[5]=mon[7]=mon[8]=mon[10]=mon[12]=31;
    mon[4]=mon[6]=mon[9]=mon[11]=30;mon[2]=28+f(y);
    for(j=1;j<=m;j++)
        t+=mon[j-1];
    t+=d;
    return t;
}
int main()
{
	int sy,sm,sd,ey,em,ed;
	int i,x=0;
	scanf("%d%d%d%d%d%d",&sy,&sm,&sd,&ey,&em,&ed);
	for(i=sy;i<ey;i++)
		if(i%4==0&&i%100!=0||i%400==0)
			x=x+366;
		else x=x+365;
	for(i=1;i<sm;i++)
		if((sy%4==0&&sy%100!=0||sy%400==0)&&i==2)
			x=x-29;
		else if(i==2) x=x-28;
		else if(i==1||i==3||i==5||i==7||i==8||i==10||i==12) x=x-31;
		else x=x-30;
	for(i=1;i<em;i++)
		if((ey%4==0&&ey%100!=0||ey%400==0)&&i==2)
			x=x+29;
		else if(i==2) x=x+28;
		else if(i==1||i==3||i==5||i==7||i==8||i==10||i==12) x=x+31;
		else x=x+30;
	if(sm!=em) x=x+ed-sd;
	else x=x+ed-sd;
	printf("%d\n",x);
	return 0;
}
int main()
{
	int y1,y2,m1,m2,d1,d2,s1=0,s2=0,i,t;
	int m[12]={31,28,31,30,31,30,31,31,30,31,30,31};
	scanf("%d%d%d",&y1,&m1,&d1);
	if((y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0) )
	{
		m[1]=29;
	}
	for(i=1;i<y1;i++)
	{
		if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
			s1=s1+366;
		else
			s1=s1+365;
	}
	for(i=1;i<m1;i++)
	{
		s1=s1+m[i-1];
	}
	s1=s1+d1;
	scanf("%d%d%d",&y2,&m2,&d2);
	if((y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0) )
	{
		m[1]=29;
	}
	else
		m[1]=28;
	for(i=1;i<y2;i++)
	{
		if((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
			s2=s2+366;
		else
			s2=s2+365;
	}
	for(i=1;i<m2;i++)
	{
		s2=s2+m[i-1];
	}
	s2=s2+d2;
	t=s2-s1;
	printf("%d",t);
	return 0;
}
/*
 * days.cpp
 *
 *  Created on: 2011-11-4
 *      Author: 99004
 */

int main(){
	int startyear,startmonth,startday,endyear,endmonth,endday;
	int i,dy,add,days1=0,days2=0;
	long days;
	cin>>startyear>>startmonth>>startday;
	cin>>endyear>>endmonth>>endday;
	dy=(endyear-startyear>1?(endyear-startyear-1):0);
	add=0;
	for(i=startyear+1;i<endyear;i++){
		if((i%4==0&&i%100!=0)||(i%400==0)) add++;
	}
	if((startyear%4==0&&startyear%100!=0)||startyear%400==0) add++;
	if((endyear%4==0&&endyear%100!=0)||endyear%400==0) add++;
	int month[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	if(startyear!=endyear){
	for(i=startmonth;i<13;i++) days1=days1+month[i];
	for(i=1;i<endmonth;i++) days2=days2+month[i];
	days=365*dy+add+days1+days2+(endday-startday);}
	else {
		for(i=startmonth;i<endmonth;i++) days1=days1+month[i];
		days=days1+endday-startday;
	}
	cout<<days<<endl;
	return 0;
}
//???????????
//2010?11?29?
//1000012753 ???
int countday(int year, int month, int day)
{
	int count;
	 switch (month)
	{
	case 1:
		count = day;
		break;
	case 2:
		count = (31 + day);
		break;
	case 3:
		count = (60 + day);
		break;
	case 4:
		count = (91 + day);
		break;
	case 5:
		count = (121 + day);
		break;
	case 6:
		count = (152 + day);
		break;
	case 7:
		count = (182 + day);
		break;
	case 8:
		count = (213 + day);
		break;
	case 9:
		count = (244 + day);
		break;
	case 10:
		count = (274 + day);
		break;
	case 11:
		count = (305 + day);
		break;
	case 12:
		count = (335 + day);
		break;
	}
	if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		return count;
	else
	{
		if (month <= 2)
			return count;
		else
			return (count - 1);
	}
}
int countyear(int year)
{
	int i, countyear = 0;
	for (i = 1; i <= year; ++i)
	{
		if ((i % 4 == 0 && i % 100 != 0) || (i % 400 == 0))
			countyear++;
	}
	return (countyear * 366 + (year - countyear) * 365);
}
int main()
{
	int y1, y2, m1, m2, d1, d2, count1, count2;
	cin >> y1 >> m1 >> d1;
	cin >> y2 >> m2 >> d2;
	count1 = countday(y1, m1, d1);
	count2 = countday(y2, m2, d2);
	count1 += countyear(y1 - 1);
	count2 += countyear(y2 - 1);
	cout << count2 - count1 << endl;
	return 0;
}
int a[1000];
int main()
{
	int a[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
	int b[13] = {0,31,29,31,30,31,30,31,31,30,31,30,31};
	int y1, y2, m1, m2, d1, d2;
	cin >> y1 >> m1>> d1 >> y2 >> m2 >> d2;
	int i, count = 0, sum =0;

	if (y2 -y1 >= 2)
	{
		for (i = y1+1; i <= y2-1; i++)
		{
			if( (i % 4 == 0 && i % 100 != 0) || (i % 400 == 0) )
				count ++;
		}
	}
	if (y2 -y1 >=1)
	{
		if ( (y1 % 4 == 0 && y1 % 100 != 0) || (y1 % 400 == 0) ) 
		{
			if ( (y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0) ) 
			{
				for (i = m1 + 1; i <= 12; i++)
					sum = sum + b[i];
				for (i = 1; i <= m2 - 1 ; i++)
					sum = sum + b[i];
				sum = sum + (b[m1] - d1) + d2;
			}
			else  
			{
				for (i = m1 + 1; i <= 12; i++)
					sum = sum + b[i];
				for (i = 1; i < m2 ; i++)
					sum = sum + a[i];
				sum = sum + (b[m1] - d1) + d2;
			}
		}
		else 
		{
			if ( (y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0) ) 
			{
			
				for (i = m1 + 1; i <= 12; i++)
					sum = sum + a[i]; 
				for (i = 1; i < m2 ; i++)
					sum = sum + b[i];
				sum = sum + (a[m1] - d1) + d2;
			}
			else 
			{
			
				for (i = m1 + 1; i <= 12; i++)
					sum = sum + a[i];
				for (i = 1; i < m2 ; i++)
					sum += a[i];
				sum = sum + (a[m1] - d1) + d2;
			}
		}
	}

	if (y2 -y1 >=1)
	{
		sum = sum + count * 366 + (y2- y1 - 1 - count) * 365;
		cout << sum;
	}
	if  (y2 - y1 == 0)
	{
	if ( (y2 % 4 == 0 && y2 % 100 != 0) || (y2 % 400 == 0) ) 
	{
		for (i = m1 + 1; i <= 12; i++)
		sum = sum + b[i];
		for (i = 1; i <= m2 - 1 ; i++)
			sum = sum + b[i];
	sum = sum + (b[m1] - d1) + d2 - 366;
	}
	else
	{
		for (i = m1 + 1; i <= 12; i++)
					sum = sum + a[i];
				for (i = 1; i < m2 ; i++)
					sum += a[i];
				sum = sum + (a[m1] - d1) + d2 - 365;
			}
	cout << sum;
	}
	return 0;
}
int main()
{
	int startyear,startmonth,startday,endyear,endmonth,endday,n=0,year,j,t=0,d;
    int a[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
scanf("%d%d%d%d%d%d",&startyear,&startmonth,&startday,&endyear,&endmonth,&endday);
	for(year=startyear;year<=endyear;year++)
		if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
			n++;
	year=startyear;
	if((year % 4 == 0 && year % 100 != 0)|| (year % 400 == 0))
		if(startmonth>2)
		n--;
	year=endyear;
	if((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
		if((endmonth<2)||((endmonth==2)&&(endday<29)))
		n--;
	if(n<0)
		n=0;
	for(j=1;j<=12;j++)
	{if(j>startmonth)
	t=t+a[j];}
	t=t+a[startmonth]-startday;
	t=t+365*(endyear-startyear-1)+n;
	for(j=1;j<=12;j++)
	{if(j<endmonth)
	t=t+a[j];}
	t=t+endday;
	printf("%d",t);
	return 0;
}
int m[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
struct date
{
	int year;
	int month;
	int day;
};
int count1(int a,int b)
{
	int i,s=0;
	for(i=1;i<a;i++)
		s=s+m[i];
	return s+b;
}
int count2(int a,int b)
{
	int i,s=0;
	for(i=1;i<a;i++)
		if(i==2)
			s=s+m[i]+1;
		else
			s=s+m[i];
	return s+b;
}
int main()
{
	int i,x=0,day[2]={0};
	struct date start,end;
	cin>>start.year>>start.month>>start.day;
	cin>>end.year>>end.month>>end.day;
	for(i=start.year;i<end.year;i++)
		if((i%4==0&&i%100!=0)||(i%400==0))
			x=x+366;
		else
			x=x+365;
	if((i%4==0&&i%100!=0)||(i%400==0))
		x=x+count2(end.month,end.day)-count2(start.month,start.day);
	else
		x=x+count1(end.month,end.day)-count1(start.month,start.day);
	cout<<x<<endl;
	return 0;
}